Playground · Fourier Epicycles
Fourier epicycles
Any closed drawing — however wiggly — can be rebuilt by stacking rotating circles, each a pure wave. Draw your own shape and watch a chain of epicycles trace it out. It's the Fourier transform made visible — the same maths behind audio, images and signal processing.
Draw a closed shape in one stroke — or pick a preset.
How it's built
Your drawing is sampled into a list of points, treated as complex numbers, and run through a discrete Fourier transform in vanilla JS. Each output term becomes a circle with a radius (amplitude), a start angle (phase) and a rotation speed (frequency). Stack them tip-to-tip, biggest first, spin them, and the final tip traces your shape. Use fewer circles for a rough sketch, more for a crisp copy — exactly the accuracy/complexity trade-off in real signal compression.