mljr.eu
Back

Fourier Drawing

Draw a shape on the left, press Play, and watch a chain of rotating circles trace it back out using nothing but sine waves.

30

How it works

Any closed shape traced out over time is just a signal — an x-coordinate and a y-coordinate, each varying with time. Treat that pair as one complex number per instant, and the Discrete Fourier Transform decomposes it into a sum of rotating vectors (circles), each spinning at its own fixed speed, size, and starting angle.

Chaining those circles tip-to-tail — largest first, for the classic nested look — and letting each one spin at its own frequency reproduces the original path: at every instant, the tip of the last circle in the chain lands exactly where the pen was at that point in the drawing. More circles capture finer detail; a handful of the largest ones already outline the rough shape.

The strip along the bottom shows the same reconstruction from a different angle: the vertical position of that final tip, plotted against time as it scrolls by — the individual sine wave layered motion that the circles are actually built from, made visible as a single continuous signal.

Drag the "number of waves" slider down and you're looking at a compression algorithm in miniature: this is the same core idea as JPEG or MP3 — throw away the frequency components that contribute the least, and keep the shape recognizable with a fraction of the original data.

circles chained tip-to-tail; the final tip traces the shape and feeds the wave graph