Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Dan Ebbert’s Spirograph Expression

  • Dan Ebbert’s Spirograph Expression

    Posted by Chris Trollen on June 12, 2010 at 4:10 pm

    Hello,

    I was wondering if someone could assist me with Dan Ebbert’s spirograph expression? https://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.

    Jonathan Nielsen replied 7 years, 2 months ago 3 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    June 12, 2010 at 4:40 pm

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

    Dan

  • Chris Trollen

    June 12, 2010 at 4:44 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

  • Chris Trollen

    June 12, 2010 at 5:16 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

  • Dan Ebberts

    June 12, 2010 at 5:28 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

  • Chris Trollen

    June 12, 2010 at 6:04 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

  • Jonathan Nielsen

    February 25, 2019 at 12:22 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy