Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Expression for Making Something Travel in an Oval?

  • Expression for Making Something Travel in an Oval?

  • Mark Walczak

    July 20, 2009 at 6:34 pm

    Hey everyone,

    I was wondering if someone could point me in the right direction to creating an expression that would cause a layer to move in a 2D oval path. I have exhausted such options as pasting an oval mask into the position of said layer, but it really doesn’t give me the control I want. Essentially, my dream expression would have:
    – X-radius width adjustments
    – Y-radius height adjustments
    – a link to a slider control where I can control the revolutions from zero to 1,2, etc.

    Any ideas? Let me know if I need to clarify…

    PS – I also tried Andrew Kramer’s 3D Orbit tool, but it only supports circles, not ovals…

    What makes you explode?
    http://www.explosivegraffix.com

  • Dan Ebberts

    July 20, 2009 at 7:15 pm

    Try this, with slider control “a” for the radius in the x direction, slider control “b” for the radius in the y direction, and an angle control:

    a = effect(“a”)(“Slider”);
    b = effect(“b”)(“Slider”);
    angle = effect(“Angle Control”)(“Angle”);

    center = [thisComp.width,thisComp.height]/2;
    rads = degreesToRadians(angle);
    center + [a*Math.sin(rads),b*Math.cos(rads)]

    Dan

  • Mark Walczak

    July 20, 2009 at 7:33 pm

    Dan,

    I believe I’ve said it before, but I’ll say it again: YOU ARE AMAZING!!!

    Thank you so much – you’ve saved me a precious hour of messing around with Java. I hope to learn it more in-depth soon!

    Best,

    What makes you explode?
    http://www.explosivegraffix.com

Viewing 1 - 3 of 3 posts

Log in to reply.

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