Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Circular Motion Expression?

  • Xinlai Ni

    November 17, 2009 at 6:02 pm

    radius = yourRadius;
    startAngle = degreesToRadians(yourStartAngle); // yourStartAngle in degrees
    T = yourTimeToCompleteOneRevolution; // in seconds
    angularSpeed = 2 * 3.1415926 / T;
    xt = yourCenterX + radius * Math.cos(angularSpeed * time + startAngle);
    yt = yourCenterY + radius * Math.sin(angularSpeed * time + startAngle);
    [xt, yt]

    Xinlai Ni
    Software Engineer, Google Inc.

  • Ryan Hill

    November 18, 2009 at 4:09 pm

    I think also you can use Math.PI instead of 3.1415…

    Plus, if you’re not up on your trigonometry, there’s plenty of ways you could rig this up by parenting one layer to another layer and then using .toWorld() to get the position of it.

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