Rolling curve / 16

Petal + epicycloid

Geometry

An epicycloid of radius R1 + r1 is added to a petal term R·cos((a/b)·t) riding on the unit circle.

x(t) = (R1 + r1)·cos t − r1·cos((R1 + r1)/r1 · t) + R·cos((a/b)·t)·cos t
y(t) = (R1 + r1)·sin t − r1·sin((R1 + r1)/r1 · t) + R·cos((a/b)·t)·sin t

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