A fixed outer ring of radius R and a rolling inner circle of radius r trace a hypotrochoid: x=(R−r)cosθ+d·cos(kθ), y=(R−r)sinθ−d·sin(kθ), k=(R−r)/r. Drag the mode switch to trace an epitrochoid instead, where the small circle rolls around the outside of the fixed one. The gears actually rotate at the correct ratio — this isn't a decorative overlay, the pen point comes straight from the rolling-circle position each frame.