DRAW · DECOMPOSE · REBUILD
Fourier drawing machine
A faint line shows the complete approximation. The red tip traces it as the circles turn.
How much detail can a circle carry?
Try 1, 4, 12 and 127 vectors. Predict the shape before you press Play.
From a line to a sum of circles
Treat each sampled point as a complex number x + iy. The discrete Fourier transform separates the closed path into rotating vectors with different radii, phases and signed frequencies. Attach those vectors tip to tail and the final tip draws their sum.
More vectors reduce the RMS error at the 128 samples; this does not promise smaller error at every point between them. All 127 vectors plus the center reproduce the samples up to floating-point precision. Open strokes are joined from end to start. This is a finite sampled reconstruction, not an exact decomposition of every detail in a hand-drawn line.
The transform uses a 1/N normalization in the forward direction and a positive exponential for reconstruction. The canvas uses +y upward. Read about the discrete Fourier transform