Copied!
May 18, 2020
After-Effects expression
Move in a circle
This function takes simple circle properties like the radius and degrees, and returns a point on a circle, around the original value.
Using this as a position expressions, then calling the function like in the example below, will result in a circular motion that's easily customizable.
Null Layer

Position
Expression
function CircularMotion (theRadius, degrees, angleShift){
degrees = (degrees === undefined) ? - 90 : -degrees + 90
angleShift = (angleShift === undefined) ? 0 : -angleShift;
theRadius = (theRadius === undefined) ? 100 : theRadius;
xDir = Math.sin(degreesToRadians(degrees + angleShift));
yDir = Math.cos(degreesToRadians(degrees + angleShift));
return [xDir * theRadius, yDir * theRadius] + value;
}