Learning LabExplorable explanations
← All artifacts
Signals

Fourier: Drawing with Circles

Any closed drawing is just a stack of spinning circles. A Fourier transform finds them, and adding one circle at a time sharpens a crude loop into the shape you drew.

fourierdftsignalsepicycles
LiveInteractive · drag, toggle, run it
Signals / Fourier analysis

Drawing with Circles

Treat a closed path as a list of complex numbers, one per point: the x coordinate is the real part, the y coordinate is the imaginary part. The discrete Fourier transform rewrites that list as a sum of pure rotations, each at a fixed frequency. Stack those rotations tip to tail and the last tip retraces the original drawing.

circles
8
energy kept
100.0%
max gap (px)
3.6
path points
256
Pick a shape, or draw your own

Each shape is sampled into 256 points around its perimeter, then run through the same transform. A drawn loop is resampled to the same 256 points so the math is identical.

or sketch one below
Press and drag to sketch a loop.
What the slider is doing

Every circle is one frequency. Its radius is that frequency’s amplitude (how much it contributes), and where it starts in its spin is its phase. The transform hands back one circle per path point; sorting them by amplitude puts the biggest, slowest contributions first.

With one circle you get a plain loop. Add the next few and the rough shape appears. The small fast circles that come later only carve out corners and fine wiggles, which is why “energy kept” climbs fast at first and then crawls: a handful of circles already captures most of the curve, and the long tail just sharpens edges. Drag the count to the maximum and the gap to the target collapses to sub-pixel.

Discrete Fourier transform over 256 complex samples. Reconstruction sums 8 rotating vectors; with all 256 the path returns exactly.