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.