Skip to content
Adrien Hubert

Fourier epicycles.

Any closed path can be written as a sum of circular motions, each turning at a whole-number speed. Stack those circles tip to tip and the last point traces the path back out. Below, the circles come from the discrete Fourier transform of a shape. Pick a preset or draw your own, then thin the chain down and watch how few circles the form needs.

Drag inside the box to draw
64 / 256
1.0x

What you are seeing

The path is sampled into 256 evenly spaced points, read as complex numbers with x on the real axis and y on the imaginary one. A discrete Fourier transform turns those 256 points into 256 rotating circles. Each circle has a radius, a starting angle and an integer frequency, the number of full turns it makes per loop. The green dot at the end of the chain is the pen, and the line it leaves behind is the reconstruction.

Why thinning works

The circles are sorted by radius, largest first, so the slider keeps the loudest frequencies and drops the quietest. The big slow circles carry the overall shape; the small fast ones add corners and fine wiggle. Drag the slider to a handful of circles and a sharp star rounds into a soft blob, then snaps back to crisp points as you add the high frequencies in. This is the same trade that lets JPEG and MP3 throw away the smallest coefficients and keep something close to the original.

The transform

For a signal of N samples the coefficient at frequency k is the average of x[n]·e−2πikn/N over all n. Its magnitude becomes the circle radius and its angle becomes the phase. To rebuild the path you run the sum the other way, letting each term spin as e+2πikt. The whole thing here is a plain O(N²) transform computed once when the shape changes, which is plenty for 256 points.