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:

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.

petals = lcm(R, r) / r

The LCM is the smallest number that is divisible by both R and r. For ring 96 and wheel 45:

lcm(96, 45) = 1440
petals = 1440 / 45 = 32

Try the calculator below to see the formula work with any combination:

Petal Count Calculator

Open in Visualizer →
gcd(96, 45) = 3
lcm(96, 45) = 96 × 45 / 3 = 1440
Petals = 1440 / 45 = 32
Rotations to close = 1440 / 96 = 15

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:

rotations = lcm(R, r) / R

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.

Why fewer petals = simpler

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.

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.

x(θ) = (R − r) · cos(θ) + d · cos(((R − r) / r) · θ)
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).

Frequently Asked Questions

Yes, if the simplified ratio R/r is the same after dividing by gcd(R,r). For example, ring 96 / wheel 32 and ring 150 / wheel 50 both simplify to a 3/1 ratio, producing the same 3-petal shape — just at different scales on the physical toy.
The most complex (most petals, most rotations) comes from ring+wheel combinations with the smallest GCD — ideally gcd = 1 (coprime). Ring 105 / wheel 64 has gcd = 1, giving lcm = 6720 and 105 petals in 64 rotations. That's the densest single-layer pattern in the standard Deluxe set.
Denys Fisher, who invented the Spirograph in 1965, chose teeth counts that produce a wide variety of petal counts without any single combination being too quick or too slow to draw. The four ring sizes (96, 105, 144, 150) paired with 18 wheels produce petal counts ranging from 2 to 105, covering simple to extremely dense patterns.
No — the wheel must be smaller than the ring to fit inside it. The maximum wheel size that fits inside a ring is one where r < R. In practice, the Spirograph toy's smallest wheel (24 teeth) is well under a quarter of the largest ring (150 teeth).
A spirograph draws a hypotrochoid — the curve traced by a pen fixed to a small circle rolling inside a larger one. Rolling the wheel outside the ring instead produces an epitrochoid. Both belong to the family mathematicians call roulettes: curves generated by one shape rolling along another.
Two pieces of math govern every pattern. Number theory sets the structure: the petal count is lcm(ring, wheel) ÷ wheel, so it depends entirely on the greatest common divisor of the two tooth counts. Trigonometry sets the shape: a pair of parametric equations combining two circular motions — the wheel's orbit around the ring and its spin about its own center — traces the actual curve.
No. A fractal shows new detail at every level of zoom, while a spirograph pattern is a smooth closed curve with a fixed amount of detail — zoom in and you just see a smooth line. The resemblance comes from repetition: both feel intricate because a simple rule is applied many times. But a spirograph's repetition is rotational (the same petal repeated around a center), not the self-similar nesting that defines fractals.