HomeArticlesFourier Epicycles

Fourier Epicycles: Drawing With Rotating Circles

Every closed shape you can draw is secretly a sum of circles spinning at different speeds — the complex Fourier series made visible.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

A path is a complex-valued signal

Take any closed curve you can draw with a pen — a cat's silhouette, your signature, a wobbly star — and sample N points around it at equal time steps. Treat each point (x, y) as a single complex number x + iy. You now have a periodic, complex-valued signal of length N, and any periodic signal, however jagged, can be written exactly as a sum of complex exponentials: a discrete Fourier series.

Each term is a rotating circle

The discrete Fourier transform (DFT) decomposes the path into N complex coefficients ck, one per integer frequency k (including negative frequencies). Each coefficient is itself a complex number, so it has a magnitude and a phase — and a term ck·e^(i·k·2πt/N) traces out exactly a circle of radius |ck|, rotating at angular speed proportional to k, starting from phase angle arg(ck):

c_k = (1/N) · Σ_{n=0}^{N-1} path[n] · exp(-i · 2π · k · n / N)   for k = -N/2 .. N/2

reconstruction(t) = Σ_k  c_k · exp(i · k · 2π · t / N)
                        ↑ circle k: radius |c_k|, speed k, start angle arg(c_k)

Chain the circles tip to tail — the centre of circle k+1 sits at the tip of circle k — and, run for one full period, the tip of the very last circle traces your original drawing exactly. Sort the circles by |k| so the biggest, slowest one is drawn first and each successive smaller, faster circle refines the shape, and you get the classic animation: a cascade of nested wheels whose outermost point pens the picture.

live demo · a chain of epicycles redrawing a closed path● LIVE

How many circles do you actually need?

With all N circles the reconstruction is exact — this is just an invertible transform, not an approximation. The interesting behaviour is what happens with fewer: for a smooth, gently curving drawing the coefficients ck typically decay quickly as |k| grows, so a handful of low-frequency circles already capture the overall shape and only the fine wiggle is missing. A drawing with sharp corners has coefficients that decay much more slowly, because representing a discontinuity in slope with smooth sinusoids inherently needs high frequencies — the same reason a square wave's Fourier series needs infinitely many terms to reproduce a perfectly sharp edge, and rings with the small overshoot known as the Gibbs phenomenon near the corner if you stop too early.

Why negative frequencies matter

For a real-valued signal, the Fourier coefficients at +k and -k are complex conjugates of each other, and pairing them up gives you the familiar sine-and-cosine Fourier series from a first course. A 2D path is different: x + iy is genuinely complex, not real, so the +k and -k coefficients are independent and both carry real information — the +k circles spin one way, the -k circles spin the other. Drop the negative-frequency circles and a closed 2D shape typically degenerates into something that only ever traces an ellipse or a line, because you have thrown away half of the information needed to break the rotational symmetry.

From Ptolemy's epicycles to signal processing

The visual of circles riding on circles long predates Fourier analysis — Ptolemaic astronomers used epicycles and deferents to approximate planetary motion around a stationary Earth, adding more circles whenever the fit needed improving. The modern Fourier version is the same geometric idea put on exact mathematical footing: instead of hand-fitting circles to match observations, the DFT computes the exact radius, speed and phase of every circle directly from the data. The same machinery — decomposing a periodic signal into a sum of rotating phasors — is the basis of digital filters, MP3 and JPEG-style compression, and virtually every spectrum analyser.

Frequently asked questions

Is this the same epicycle idea Ptolemy used for planetary orbits?

Geometrically, yes — circles riding on circles. Ptolemy used a handful of epicycles as a geocentric approximation to real elliptical orbits and had no guarantee of exactness. The Fourier version is mathematically exact for any closed path: with enough circles it reproduces the drawing perfectly, because it comes directly from the discrete Fourier transform of the path.

Why do the circles get smaller as you add more of them?

For a typical smooth-ish drawing, the Fourier coefficients decay as frequency increases — roughly like 1/n or faster, depending on how many sharp corners the path has. Circles carrying the higher frequencies are responsible for finer detail and naturally have smaller radii; a path with sharp corners needs more of them to look crisp.

Why do you need negative frequencies as well as positive ones?

A real 2D path is a complex-valued signal, not a real-valued one, so its Fourier series is not symmetric the way a real signal's is. Circles at negative frequencies rotate the opposite direction from positive ones, and both are generally needed — dropping either half turns the reconstruction from a closed 2D path into something that traces a straight line or an ellipse instead.

Try it live

Everything above runs in your browser — open Fourier Epicycles and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Fourier Epicycles simulation

What did you find?

Add reproduction steps (optional)