A small gear rolls round inside a ring with a pen poking through it. The number of teeth on each gear decides how many petals you get, and when the pattern closes.
Keep the ring at 96 and try a 36-tooth gear: 96 and 36 share a factor of 12, so you get 96 ÷ 12 = 8 petals, and the pattern closes after 36 ÷ 12 = 3 laps. Now try 35 teeth. 96 and 35 share no factor except 1, so you get all 96 petals, and it takes 35 laps to close. Predict the petals before you press Play, then check.
Push the pen hole past 100% and the petals grow loops. Press Add another pattern, change colour and gears, and build up a sheet like a real Spirograph; then download it to print. Switch to Around the outside for a different family of curves. In Gear train mode, see why a small gear spins faster than a big one, and why the gears in the middle don't change the answer.
The Spirograph toy was developed by the British engineer Denys Fisher between 1962 and 1964, using drawing machines he built from Meccano. He showed it at the Nuremberg International Toy Fair in 1965, and Kenner brought it to the United States in 1966. Gear-driven drawing machines are older: the Polish mathematician Bruno Abakanowicz made a spirograph device in the late 1800s.
The curves have names. A gear rolling inside a ring draws a hypotrochoid; rolling round the outside draws an epitrochoid. Both are a circle riding on a circle, the same idea Ptolemy used for the planets, with his epicycles, nearly two thousand years ago. Add more circles riding on circles and you can draw any shape at all: see Can circles draw anything?