We use essential cookies to run the site (session, security, and your theme/language preferences). With your permission we also load embedded third-party content, such as YouTube videos. Cookie Policy
Spirograph Roulettes
The hidden arithmetic of rolling circles
Author(s):Elier Rodríguez García
Index
Introduction
If you grew up with a Spirograph set, you know the ritual: place a toothed ring on the paper, fit a smaller gear inside, push a pen through one of its holes, and roll. The result is a looping, petal-covered curve that looks far too elegant to come out of a toy.
What you were really doing is tracing a hypotrochoid — the path swept by a point attached to a circle that rolls inside a larger circle. Every loop, every petal, every gap in the design follows directly from two numbers: the radius of the outer ring and the radius of the rolling gear.
The ratio of those two numbers — whether it reduces to 53 or 127 or 41 — decides how many petals appear, how many full rotations the pen makes before returning to the start, and whether it ever returns at all. This article unpacks that arithmetic so the next time you watch a Spirograph fill the page you can read it like a clock.
Draw Your Own
Drag the sliders to choose the outer radius R and the inner radius r, then watch the hypotrochoid draw itself in real time. The pen offset d moves the tracing point closer to or farther from the centre of the rolling gear — try extreme values for looped vs pointy petals.
Notice that the curve closes — returns exactly to where it started — only when rR is a rational number, which it always is for whole-number gear sizes. When R/r=p/q in lowest terms, the curve needs exactly p full turns of the outer circle (equivalently q full rotations of the inner gear) to close, and it draws exactly ∣R−r∣/gcd(R,r) lobes. Try R=5,r=3 for two lobes; R=7,r=3 for four lobes; R=9,r=4 for a star-like five-pointed figure.
The Real Maths
The parametric equations of a hypotrochoid with outer radius R, inner radius r, and pen offset d are:
x(t)=(R−r)cost+dcos(rR−rt)
y(t)=(R−r)sint−dsin(rR−rt)
where t advances as the inner circle rolls. Three facts follow purely from arithmetic:
Closing condition. The curve closes after t=2πk for the smallest integer k such that k⋅(R−r)/r is also an integer. Writing R/r=p/q in lowest terms (so gcd(p,q)=1), the curve closes after exactly k=q turns of the outer arc, which equals p full rotations of the inner gear.
Petal count. The number of distinct lobes equals p−q=(R−r)/gcd(R,r). With R=9,r=4 we get gcd(9,4)=1, so p=9,q=4, giving 9−4=5 petals — matching the star you see in the demo.
Period. The total arc length traced before closing is 2π⋅lcm(R,r)/r, because lcm(R,r)=Rr/gcd(R,r).
All three facts reduce to the same two operations: greatest common divisor and least common multiple — elementary number theory that any calculator can compute, yet powerful enough to generate an infinite family of distinct symmetric curves. The same GCD/LCM reasoning appears throughout discrete mathematics and even in modular arithmetic.
Where It Matters
The mathematics of rolling circles is not confined to toy boxes:
Wankel rotary engine: the rotor inside a Wankel engine traces an almost-hypotrochoid (technically an epitrochoid). The three-lobe shape follows directly from the gear ratio between the rotor and the eccentric shaft — the same arithmetic as the demo above.
Gear design and hobbing: the involute profiles used on most modern gear teeth are limiting cases of roulette curves; choosing the pressure angle is choosing a point on a rolling circle.
Antenna arrays: phased arrays and mechanically steered antennas exploit the fact that a point on a rolling circle sweeps predictable angular velocities — useful when designing scanning patterns.
Computer graphics and fonts: PostScript and TrueType bezier curves approximate roulettes to render smooth circular arcs efficiently; the same parametric thinking drives path-animation tools in SVG and CSS.
Orbital mechanics: epicyclic models of planetary motion (Ptolemy's deferents and epicycles) are exactly roulette curves — the Greeks had the geometry right, only the physics wrong.
Whenever you need a curve that is almost circular but richer, closed but not a circle, symmetric but varied, a rolling-circle roulette is the first tool to reach for.
Conclusion
A Spirograph looks like magic — a mechanical pen tracing intricate flowers without a single conscious decision about where to go. But the design was always completely determined: by the ratio R/r, reduced to lowest terms, the number of petals was fixed before the first tooth engaged.
That is the deeper lesson. The GCD of two integers is one of the simplest things in mathematics, yet it controls the entire symmetry group of the resulting curve. Add the constraint that both radii must be whole numbers and you get a discrete family of patterns — infinitely many, but not all patterns are reachable. The gaps between reachable patterns are just as interesting as the curves themselves.
If you want to keep exploring, try the same reasoning with a circle rolling outside another (an epicycloid — the path that draws a cardioid or nephroid), or ask what happens when d>r, pushing the pen beyond the rolling circle's edge. The arithmetic stays the same; only the shape changes.
Comments
Loading comments...