Spirograph Simulator: Hypotrochoid & Epicycloid Curves

simulator beginner ~8 min
Loading simulation...
6-fold symmetry — hypotrochoid with R=60, r=30

With R=60, r=30, and d=40, the spirograph produces a hypotrochoid with 2-fold symmetry that closes after 1 full rotation. The pen extends beyond the inner circle, creating cusped loops.

Formula

x(t) = (R − r)cos(t) + d·cos((R − r)t / r)
y(t) = (R − r)sin(t) − d·sin((R − r)t / r)

The Mathematics of Rolling Circles

The spirograph toy, invented in 1965 by Denys Fisher, is a physical implementation of a mathematical concept studied since the ancient Greeks. When one circle rolls inside another without slipping, a point attached to the rolling circle traces a curve called a hypotrochoid. The shape of this curve depends on three parameters: the radius of the outer circle R, the radius of the inner circle r, and the distance d of the pen from the center of the inner circle.

Parametric Equations

The hypotrochoid is described by the parametric equations x(t) = (R-r)cos(t) + d*cos((R-r)t/r) and y(t) = (R-r)sin(t) - d*sin((R-r)t/r). When d equals r, the curve is called a hypocycloid — the pen is on the rim of the rolling circle. When d is greater than r, the loops extend outward, creating cusped patterns. The ratio R/r determines the fundamental symmetry of the curve.

Symmetry and Closure

A spirograph curve closes (returns to its starting point) when R/r is a rational number p/q in lowest terms. The curve then has p-fold rotational symmetry and requires q full rotations of the inner circle. When R/r is irrational, the curve never closes and eventually fills an annular region — a mathematical curiosity that physical spirographs cannot produce due to their discrete gear teeth.

From Toy to Art to Science

Beyond their beauty, hypotrochoid curves appear in engineering (Wankel rotary engines use an epitrochoid combustion chamber), astronomy (certain orbital resonances trace epicycloid paths), and even currency design (the shapes on British pound coins are Reuleaux polygons related to hypocycloids). The spirograph remains one of the most accessible demonstrations that mathematics and art are deeply intertwined.

FAQ

What is a spirograph curve mathematically?

A spirograph produces a hypotrochoid — the curve traced by a point attached to a circle rolling inside a larger circle. The parametric equations are x = (R−r)cos(t) + d·cos((R−r)t/r) and y = (R−r)sin(t) − d·sin((R−r)t/r), where R is the outer radius, r is the inner radius, and d is the pen distance.

When does a spirograph curve close?

The curve closes when R/r is a rational number. Specifically, it takes LCM(R,r)/r full rotations of the inner circle. If R and r are coprime, the curve requires R rotations to close.

What is the difference between a hypotrochoid and an epicycloid?

A hypotrochoid is traced by a point on a circle rolling inside another circle. An epicycloid is the special case where the pen is on the rim (d = r). A hypocycloid is when d = r and the inner circle rolls inside the outer one.

Why do spirographs produce such beautiful patterns?

Spirographs create beauty through mathematical symmetry. The ratio R/r determines the rotational symmetry, while d controls the amplitude of the loops. Simple integer ratios produce elegant, closed curves with high symmetry.

Sources

Embed

<iframe src="https://homo-deus.com/lab/art-mathematics/spirograph/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub