Spiral Gear Drawing Toy

A spiral drawing toy, like the classic gear sets: a pen held in a small wheel draws as the wheel rolls around inside or outside a fixed ring. This page computes those curves, and Lissajous figures, which combine two perpendicular sine waves. Download the drawing as SVG for a pen plotter or laser cutter, or as PNG.

Drawing

Presets

Curve

Inside the wheel when smaller than the wheel radius, outside it when larger.

How far ahead the horizontal wave starts.

How much the figure shrinks on each turn. A damped figure never closes, so its length is set by Turns.

Line

One turn is one trip of the wheel around the ring.

How it works

In a hypotrochoid, a wheel of radius r rolls inside a fixed ring of radius R, and the pen sits at distance d from the wheel’s center:

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

y(t) = (R − r) sin t − d sin((R − r)t / r)

In an epitrochoid, the wheel rolls around the outside of the ring:

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

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

t is the angle of the wheel’s center around the ring; one turn is 2π. With whole-number radii, the curve closes after r / gcd(R, r) turns and has R / gcd(R, r) loops, where gcd is the greatest common divisor.

A Lissajous figure combines a horizontal and a vertical sine wave:

x(t) = sin(at + δ) · st / 2π,   y(t) = h sin(bt) · st / 2π

a and b are the frequencies, δ is the phase, h is the height to width ratio, and s is the fraction of size kept after each turn. Without damping (s = 1), the figure closes after one turn.