Spirograph — drawing rosettes with gear ratios
Spirograph is a spirograph online: it reproduces the classic plastic toy in a browser. A small wheel rolls inside a bigger one, and a pen at offset distance d traces a rosette curve called a hypotrochoid. Three sliders let you tweak the gear sizes and the offset; the curve redraws live as you move them.
How to play
The pen is always running at the center of the canvas. By default it leaves only a faint sketch that fully vanishes after about two seconds — so you can tune R, r, d, pick an ink color, or hit Shuffle for a fresh random shape, all without committing anything. When the rosette feels right, hit DRAW to commit ink to the permanent trail in the chosen color. Hit it again to stop. PNG saves the result, Reset clears everything.
Why it's satisfying
The original Spirograph (Denys Fisher, 1965) sold tens of millions of copies because the math is genuinely magical — three numbers, infinite curves. The browser version removes the only annoying part: the pencil never slips out of the hole.
The idea behind it
The curve is a hypotrochoid. The centre of the small wheel turns at distance R − r from the middle, and the pen adds its own circle of radius d on top, spinning (R − r) / r times faster. The two numbers that matter are R and r: divide both by their greatest common divisor and you get the number of petals and the number of turns before the curve closes. The default 200 and 60 share 20, so the rosette has 10 petals and closes after 3 turns. When d is smaller than r the petals are smooth; when d is larger than r, little loops appear.
Tips
- For a few wide petals, make R an exact multiple of r: 120 and 40 give 3 petals and close in a single turn.
- For fine lace, choose two numbers with no common divisor: 121 and 40 give 121 petals over 40 turns. Leave DRAW on and let it run.
- Keep R and r, change only d and the ink, and draw again: the new rosette nests exactly inside the first one.
- The sketch fades by itself, so Shuffle as often as you like before you commit any ink.
About
Spirograph is part of Alcy, fifty free contemplative micro-games in your browser. For more pattern art: Kaleidoscope, Bloom, Loop Maker.