Spirograph


To simulate a Sirograph, try applying the following expression to the brush position of the Write-on effect:


r1 = 43; 
r2 = -14; 
o = 53; 
v = 15;
s = 2.5;

r = r1 + r2; 
x = r*Math.cos(time*v) - (r2 + o)*Math.cos(r*time*v/r2); 
y = r*Math.sin(time*v) - (r2 + o)*Math.sin(r*time*v/r2); 
[s*x + thisComp.width/2, s*y + thisComp.height/2];

Play around with the various parameters:
r1 is the radius of one wheel.
r2 is the radius of the other wheel.
o is the offset.
v is the speed.
s is the scale.
Animating the brush color makes it more interesting.