Spirograph
A wheel rolling inside a ring, with a pen that traces a hypotrochoid; the wheel animates, and the sizes of the ring and wheel and the pen's distance from the wheel's centre can be edited.
A Spirograph is a toothed wheel that rolls inside a toothed ring, with a pen in one of its holes. The pen traces a curve called a hypotrochoid. This document rolls the wheel: the ring has radius R , the wheel radius w , and the pen sits at distance d from the wheel's centre.
When the wheel's centre has moved through the angle s around the ring, the wheel itself has turned the other way by \frac{R - w}{w}s , because it rolls without slipping: the arc it has covered on the ring equals the arc that has touched it. The pen is therefore at a(s) = (R - w)\cos s + d\cos\left(\frac{R - w}{w}s\right) and b(s) = (R - w)\sin s - d\sin\left(\frac{R - w}{w}s\right) . With R = 5 and w = 3 the wheel's centre goes round three times before the pen returns to its start, and the curve has five lobes: in general the curve closes after w/\gcd(R, w) turns and has R/\gcd(R, w) lobes.
After a JSXGraph example by The Center of Mobile Learning with Digital Technology.
JavaScript is required to view the interactive plot.