Rolling curve / 01

Hypotrochoid lobes

Geometry

A small circle of radius r rolls inside a fixed circle of radius R, carrying a pen at distance d from its centre. When R / r is an integer the curve closes after one revolution and has exactly that many lobes.

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

Each copy sweeps the pen distance from d / iterations up to d, nesting the curves. Brightness falls from centre to rim and each copy fans the hue by one palette cell.

Adjust a slider to redraw · Save PNG & Save GIF export · Animate traces the curve · the first slider auto-sweeps