Fourier Epicycles (2D) — Drawing with Rotating Circles

This 2D companion computes the exact same complex Discrete Fourier Transform as the 3D version, but draws the rotating-circle chain directly on a flat canvas: pick a preset shape or sketch a closed loop, drag the epicycle-count slider to add or remove terms, and watch the traced curve converge on the original path.