Fourier Epicycles Simulator (2D)

This 2D simulator draws a chain of rotating circles — epicycles — whose vector sum traces a square, star or heart from a real discrete Fourier transform of the target outline. Each circle in the chain spins at its own fixed integer frequency, so the tip of the last circle sweeps out a growing trail that converges on the target shape as more terms are added. Drag the term-count slider to add or remove circles and watch the approximation quality climb, adjust the drawing speed, and switch shapes to see how the underlying coefficients change while the same chain-of-circles mechanic keeps working underneath.