Experimental

Spirograph Generator

Draw spirograph curves from ring and wheel sizes, see exactly how many turns the pattern needs to close, and understand why the lobe count is decided by the greatest common divisor.

Last reviewed by the Radiatus Cloud team

Details appear here.

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

The pattern closes when the gears come back into phase

A spirograph traces a point fixed to a wheel rolling inside or outside a ring. The wheel returns to its starting tooth only after the ring turns a whole number of times and the wheel turns a whole number of times at once, which happens after the ring radius divided by their greatest common divisor. That single number decides everything: how many lobes the finished figure has and how many revolutions of the ring you must draw before the pen retraces its own path.

Why coprime numbers give the busiest figures

If the ring and wheel share no common factor, the wheel must go all the way round the ring before repeating, producing a lobe for every tooth on the ring. Share a factor and the pattern closes early with correspondingly fewer lobes: a 60 tooth ring with a 30 tooth wheel closes after two lobes, while 60 with 29 needs sixty. This is why the classic toy ships wheels with prime-ish tooth counts, and why changing one tooth transforms the drawing completely.

Pen offset changes the character, not the count

Moving the pen closer to the wheel centre rounds the lobes into a smooth flower; moving it outside the wheel rim makes them cross into loops. Neither changes how many lobes there are, because the lobe count comes from the gear ratio alone. Setting the offset equal to the wheel radius and the wheel to exactly a quarter of the ring produces a perfect four-cusped astroid, one of the few cases where the curve is an algebraic one with a name.

Related tools

Frequently Asked Questions

How many lobes will my spirograph have?

The ring radius divided by the greatest common divisor of the ring and wheel radii. A 60 and 29 pairing gives 60 lobes, while 60 and 30 gives only 2.

When does the curve close?

After the ring turns wheel-radius-over-gcd times. Coprime radii need the full number of wheel turns, which is why coprime pairs produce the densest figures.

What is the difference between hypotrochoid and epitrochoid?

The hypotrochoid rolls the wheel inside the ring and the epitrochoid rolls it outside. Inside gives inward-pointing lobes, outside gives outward-pointing petals.

Does the pen offset change the lobe count?

No. The offset only changes whether the lobes are rounded, cusped or crossed into loops. The count is fixed by the gear ratio alone.

Can I make a named curve?

Yes. Pen offset equal to wheel radius with the wheel at a quarter of the ring gives an astroid, and at a third gives a deltoid. Rolling outside with equal radii gives a cardioid.

Privacy & Security

Everything runs in your browser; nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Set the ring and wheel radii, then draw.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.