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; 
x=(r1+r2)*Math.cos(time*v) -(r2+o)*Math.cos((r1+r2)*time*v/r2); 
y=(r1+r2)*Math.sin(time*v) - (r2+o)*Math.sin((r1+r2)*time*v/r2); 
[s*x+this_comp.width/2,s*y+this_comp.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.