Fourier series

Draw with circles

Every closed curve — however wiggly — can be built out of circles spinning on circles. Draw a shape (or type a parametric curve) and this tool runs it through a discrete Fourier transform, then sorts the result into a chain of rotating epicycles: the biggest circle turns once per loop, the next-biggest turns twice, and so on. Sum them all up and their tips trace your original drawing. The bar chart alongside shows exactly how much each circle is contributing — drag the harmonics slider down and watch the trace simplify as you strip away the smaller circles.

Draw a stroke on the canvas. It doesn't need to be closed — the transform closes the loop for you.

30
1.0×
Draw or type a curve to begin.
Click and drag to draw a shape

Frequency spectrum

Each bar is one circle's size. Negative frequencies spin clockwise, positive spin counter-clockwise, 0 is the shape's center.

What's actually happening

Your path becomes a sequence of complex numbers z = x + iy. Running that through a discrete Fourier transform decomposes it into rotating terms A·e^(i(k·t + φ)) — each one a circle of radius A turning at a constant rate k. Add them tip-to-tail and you get your curve back.

Why truncating still works

The transform sorts terms by size, so the first few circles usually capture most of the shape. Dropping the small ones is a low-pass filter made visible: the trace stays recognizable but loses its sharp corners and fine wiggles — exactly what you'd expect from cutting high frequencies.

Reading the spectrum

The bar chart is the same information as the circles, laid out by frequency instead of by size. A tall spike at a low frequency means a smooth, simple shape; energy spread across many high frequencies means sharp corners or fine detail, like the points of the star preset.

View all math tools