The Big Idea: A Circle Rolling Inside a Circle
A spirograph works by placing a small toothed wheel inside a large toothed ring. When you roll the wheel around the ring's inner edge, a pen attached to a hole in the wheel traces a curve. That curve is a hypotrochoid — from the Greek hypo (under/inside) and trochoid (wheel-shaped).
The exact shape depends on three things:
- R — the ring's tooth count (outer, fixed)
- r — the wheel's tooth count (inner, rolling)
- d — how far the pen is from the wheel's center (pen position %)
Change any one of these three and you get a completely different pattern — which is why the Spirograph toy produces such a rich variety of curves from just a handful of plastic pieces.
From Teeth to Petals: The LCM Formula
The most useful number to know about any ring+wheel combination is the petal count — how many lobes or points the finished pattern has.
The LCM is the smallest number that is divisible by both R and r. For ring 96 and wheel 45:
petals = 1440 / 45 = 32
Try the calculator below to see the formula work with any combination:
Why Patterns Close
One of the most satisfying things about a spirograph is that the pen always returns to where it started. Why? Because the wheel must complete an exact whole number of rotations before it can return to its starting angular position inside the ring.
The number of wheel rotations needed to close the pattern is:
For ring 96 / wheel 45: 1440 / 96 = 15 rotations. After exactly 15 trips around the inside of the ring, the wheel teeth mesh with the ring teeth at exactly the same spot as they started, and the pen is back at its origin.
Think of it like two rulers laid end to end: you're looking for the shortest distance that is a whole number of both ruler lengths. That's exactly what LCM measures.
Ring 96 / wheel 48 gives lcm(96,48) = 96, so just 2 petals in 1 rotation. The wheels share a large common factor (gcd = 48), so the pattern closes almost immediately. Ring 96 / wheel 45 shares only gcd = 3, so the pattern takes 15 full rotations — much richer.
How Pen Position Changes the Shape
The pen position (0–100%) controls how far from the wheel's center the pen sits. Mathematically this is the distance d = r × pen%, where r is the wheel radius.
- 0% (center): The pen traces a perfect circle.
- ~50%: Soft, rounded petals — the classic "flower" look.
- 75–80%: The sweet spot. Distinct petals with pleasing curvature.
- 100% (edge): The sharpest, most star-like points.
The pen position doesn't change the number of petals — only the ring and wheel teeth do that. It just changes whether the petals are fat and round or thin and pointed.
The Parametric Equations
To calculate the exact coordinates of every point on the curve, we use parametric equations. The angle parameter θ runs from 0 to 2π × rotations.
y(θ) = (R − r) · sin(θ) − d · sin(((R − r) / r) · θ)
R = ring teeth | r = wheel teeth
d = pen distance from wheel center = r × (pen% / 100)
θ runs from 0 → 2π × rotationsToClose
The first term in each equation, (R − r) · cos(θ), traces the center of the
rolling wheel around the ring. The second term, d · cos(…), adds the pen's offset
from that center as the wheel rotates. Together they produce the spirograph curve.
When d = 0 (pen at center), the second term vanishes and x(θ) = (R−r)·cos(θ) — a circle. When d = r (pen at edge), the pattern reaches maximum sharpness. The visual magic lives in the tension between these two circular motions.
Hypotrochoid vs. Epitrochoid
A hypotrochoid is drawn with the wheel rolling inside the ring — which is what the standard Spirograph toy does. If the wheel rolls outside a circle, the curve is called an epitrochoid. The classic Spirograph rose curves (like the Spirograph logo itself) are epitrochoids.
Special cases: when d = r in a hypotrochoid, the curve is called a hypocycloid. For specific ring/wheel ratios these produce straight lines (r = R/2) or star polygons (r = R/3 gives a deltoid, r = R/4 gives an astroid).