SimulatorEducationDeveloperEntertainment

Fourier Epicycles

Draw a shape and watch a chain of rotating circles (a Fourier series) retrace it. Scrub the number of harmonics to see the approximation sharpen.

60
1.0×
…or draw your own closed shape on the canvas (drag, then release).

Draw anything with circles

A remarkable fact: any closed curve can be retraced by a chain of circles, each spinning at a constant whole-number speed, mounted tip to tip. The position of the last circle's tip over time draws your shape. That chain is a Fourier series made visible.

Draw a shape (or use the heart preset). The tool resamples it, runs a Discrete Fourier Transform, and turns each frequency into one rotating circle — radius = that frequency's strength, start angle = its phase.

What the harmonics slider shows

Circles are sorted biggest-first. A few large circles capture the gross shape; each extra one adds finer detail and sharper corners. Slide harmonics from 1 upward and watch a blob tighten into your exact drawing — a direct, tactile demonstration of why Fourier series converge, and why a few terms are often “good enough.”

The math, briefly

Each drawn point is treated as a complex number x + iy. The DFT decomposes that sequence into frequency components cₖ · e^(i·k·t); each component is exactly a circle of radius |cₖ| turning at frequency k. Summing them reconstructs the path — corners need high frequencies, smooth arcs need only low ones.

Why it matters

The same decomposition underlies audio and image compression (keep the big coefficients, drop the rest — that's essentially JPEG and MP3), signal filtering, and the epicycle models astronomers used for planetary motion centuries before calculus. Epicycle drawing went viral because it makes an abstract transform something you can literally watch draw a cat.