ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Dan Ebbert's Spirograph Expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Trollen
Dan Ebbert's Spirograph Expression
on Jun 12, 2010 at 4:10:06 pm

Hello,

I was wondering if someone could assist me with Dan Ebbert's spirograph expression? http://www.motionscript.com/expressions-lab-ae65/spirograph.html

Is there a simple way to add the z dimension to this? Expressions are not my strong suit and I have had little success playing around with it.

Any assistance would be greatly appreciated!

Regards,

Chris




r1 = 43;
r2 = -14;
o = 53;
v = 15;
s = 2.5;

r = r1 + r2;
x = r*Math.cos(time*v) - (r2 + o)*Math.cos(r*time*v/r2);
y = r*Math.sin(time*v) - (r2 + o)*Math.sin(r*time*v/r2);
[s*x + thisComp.width/2, s*y + thisComp.height/2];

Play around with the various parameters:
r1 is the radius of one wheel.
r2 is the radius of the other wheel.
o is the offset.
v is the speed.
s is the scale.
Animating the brush color makes it more interesting.


Return to posts index

Dan Ebberts
Re: Dan Ebbert's Spirograph Expression
on Jun 12, 2010 at 4:40:04 pm

What do you want it to do? Do you have an example of how you want the result to look?

Dan




Return to posts index

Chris Trollen
Re: Dan Ebbert's Spirograph Expression
on Jun 12, 2010 at 4:44:45 pm

Mr. Ebbert's,

I currently have a very basic animation where I have set up a trail of particles (CC Particle World) linked to a null that is horizontally orbiting around some text (I used Andrew Kramer's orbit preset). I wanted to expand on this and have the particle trail spiral around the text on all axis and thought that your spirograph expression might work.

Many thanks for any help and guidance with this.

Regards,

Chris


Return to posts index


Chris Trollen
Re: Dan Ebbert's Spirograph Expression
on Jun 12, 2010 at 5:16:40 pm

Mr. Ebberts,

Here is a quick screenshot of what I currently have (particles orbiting horizontally only - my camera view is facing down from the left roughly 45 degrees towards the text).

Thanks

Chris





Return to posts index

Dan Ebberts
Re: Dan Ebbert's Spirograph Expression
on Jun 12, 2010 at 5:28:14 pm

I think I might start with just an oscillation in z to see if it generates a kind of woven texture. I haven't tried it, but something like this (fiddle with a and f to see if you get something interesting):

r1 = 43;
r2 = -14;
o = 53;
v = 15;
s = 2.5;
a = 50;
f = 3;

r = r1 + r2;
x = r*Math.cos(time*v) - (r2 + o)*Math.cos(r*time*v/r2);
y = r*Math.sin(time*v) - (r2 + o)*Math.sin(r*time*v/r2);
z = a*Math.sin(time*f);
[s*x + thisComp.width/2, s*y + thisComp.height/2, z];

I'm sure there's a more interesting function for the z coordinate, but I don't have one handy.

Dan



Return to posts index

Chris Trollen
Re: Dan Ebbert's Spirograph Expression
on Jun 12, 2010 at 6:04:05 pm

Mr. Ebberts,

Amazing! - I'll play around with this, but at a quick first application of the expression it looks like it is working!

Many thanks again.

Regards,

Chris


Return to posts index


Jonathan Nielsen
Re: Dan Ebbert's Spirograph Expression
on Feb 25, 2019 at 12:22:24 pm

Hi everyone,

This is really helpful. Do any of you know how to make the spirograph as a line instead of dots? When I set V to 1, it appears as if it's a line, but this means i can't really control the speed.

Thanks,

/Jonathan


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]