Mathematical Shape Designs in After Effects

Creating complex, symmetrical, and intricate paths and shapes are usually impossible, if not extremely tedious to do manually. With the help of some math and expressions, we can automatically calculate these shapes and adjust them by changing value parameters.

In this tutorial, we’ll look at one algorithm: spirographs. You can read more about spirographs on your own, or this simplified article, but the idea is to drive designs using circles. By using a larger circle to drive another offset circle, you can outline a path to create beautiful designs based on the offset angle of the smaller circle.

Download the Spirograph preset (requires AE CC 2018+)

For this to work, you’ll need to have AE CC 2018 or above to get access to the new path property. We basically run a loop all around the larger circle’s circumference, while plotting the points of our smaller circle being offset by our “ratio”. Since this relies on expressions, it’s calculated at every frame, making it extremely slow so I would recommend baking the final animation to keyframes. Since the whole thing is a shape layer, you have full customizability that you would with any other shapes and can add other effects on top of the preset.

If anyone has any ideas on how to improve the expression, or if you have a clean way to calculate and play with the bezier tangent points, I’m all ears!

Leave a Reply

Your email address will not be published. Required fields are marked *