Friday, March 1, 2013

Circular Motion in After Effects

image source
For my name project, I needed a way to constrain a point to the perimeter of a circle, so I searched for a good way to do it with expressions.  I found a couple of neat expressions that were very useful on Motion Graphics Exchange.  Here's what they posted:

The expression can be applied to anything in After Effects with a 'position' property to create a variety of effects. Here it's used with a light and Trapcode Particular.

For Circular:
radius=300 angle=time*200 x=radius*Math.cos(degreesToRadians(angle))
y=radius*Math.sin(degreesToRadians(angle)) z=0 centre=[640,360,0] add(centre,[x,y,z]) 

For Spiral:
shrink=time+1 radius=1000/shrink angle=time*200 x=radius*Math.cos(degreesToRadians(angle)) y=radius*Math.sin(degreesToRadians(angle))//z=0 // no depth z=time*time // with depth centre=[640,360,0]add(centre,[x,y,z])
[source]

These are very useful expressions that are really easy to use, because they are set up with variables that you can change to fit your specific circumstance.  Here's an example where they used the spiral expression, and by animating both the "z" position and the radius, they were able to get a neat animation of a christmas tree.


No comments :

Post a Comment