Skip to content

How do you draw a spirograph that closes?

Set the gears or the pendulums and see the curve at once: spirograph rosettes and harmonograph spirals, from the numbers you choose.

Spirograph

Key values as a table
QuantityValue
Ring teeth96
Wheel teeth40
Pen hole distance28
Lobes12
Turns to close5
Common divisor of the teeth8

Result

Wheel turns to close the curve: 5 A 40-tooth wheel in a 96-tooth ring draws a curve with 12 lobes and closes after 5 turns of the wheel.
Spirograph

The wheel rolls

In gear teeth. 40 is the rim of the wheel; more reaches beyond it.

Set the gears or the pendulums and see the curve at once: spirograph rosettes and harmonograph spirals, from the numbers you choose.

Press play to watch the pen trace the curve, step it on bit by bit, and zoom in on the loops.

How to use

  1. Pick the machine: a spirograph (a wheel rolling in a ring) or a harmonograph (two swinging pendulums).
  2. Type the gear teeth and the pen hole distance, or the pendulum frequencies. The curve is drawn at once.
  3. Read how many lobes the curve has and after how many turns it closes. Press Play on the picture to watch the pen draw it, and roll the wheel outside the ring or change the fading in the panel under it.

How it works

A spirograph pen sits in a hole of a small wheel that rolls round the inside of a ring. Every tooth that passes the ring turns the wheel a little, and the pen traces a rosette. The wheel returns to its start only when whole numbers of teeth have passed, so the curve closes after the wheel has gone round enough times, and the shape has as many lobes as the teeth share in common.

With a ring of R teeth, a wheel of r teeth and the pen d teeth from the wheel's centre, the pen is at x = (R − r) cos t + d cos((R − r) t ÷ r) and y = (R − r) sin t − d sin((R − r) t ÷ r). Let g be the greatest common divisor of R and r. The curve has R ÷ g lobes and closes after r ÷ g turns. For example a 96-tooth ring and a 40-tooth wheel give g = 8, so 12 lobes after 5 turns. A harmonograph adds two sine waves for each axis, each fading with time, so the pen spirals inwards. Whole-number frequencies close the shape and a small detune makes it turn slowly.

The pen hole distance changes the look: near the wheel's centre the curve is gentle, near the rim it grows loops, and beyond the rim the loops are large. The picture is idealised: real plastic gears slip a little and real pens leave a line of some width.

Frequently asked questions

How many lobes does my spirograph have?

Divide the ring's teeth by the greatest common divisor of the ring and wheel teeth. A 96-tooth ring with a 40-tooth wheel has 96 ÷ 8 = 12 lobes.

Why does the curve take several turns to close?

The wheel only returns to its exact starting position when whole numbers of teeth have passed on both gears. That takes wheel teeth ÷ common divisor turns.

What does the pen hole distance do?

It decides how deep the lobes reach. A hole near the centre gives a soft rosette. A hole at the rim gives sharp points, and a hole beyond the rim gives loops.

What is a harmonograph?

A drawing machine with pendulums that move a pen and a table. The pen traces two swings added together, which slowly die away, so the line spirals inwards.

Why does my harmonograph never close?

Damping makes each swing a little smaller, so the line never returns to its own path. It is an ever-shrinking spiral.

Send feedback