Rolling curve / 06

Tri-fold hypotrochoid

Geometry

A circle of radius r rolls inside a fixed circle of radius R, and the rolling term is multiplied by sin(3·t).

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

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