Free tools & games for everyone
Free · No sign-up · No accounts
Draw any shape and watch a chain of spinning circles redraw it with a Fourier transform; build square, sawtooth and triangle waves from sines.
| Tab | Move between tabs, sliders, boxes and buttons |
|---|---|
| Arrow keys on a slider | One circle or term more or fewer |
| Finger, pen or mouse in the box | Draw your own shape (one stroke) |
| Space on Pause or Play | Stop or restart the circles |
The outline is first resampled to 256 points evenly spaced along its length. Each point (x, y) is treated as the complex number x + iy, and the discrete Fourier transform Xk = (1/N) Σ zn e−2πikn/N gives one circle per frequency: its radius is |Xk|, its starting angle the angle of Xk, and it turns k times per lap (frequencies above N/2 are counted as negative, turning the other way). Adding all N circles gives back every sample exactly; keeping only the biggest K gives the best K-circle redraw in the least-squares sense (Parseval's theorem).
The waves tab sums the classic Fourier series of a square wave, a sawtooth and a triangle wave of height 1. The overshoot is found by checking 4,001 points beside the jump; as the number of terms grows it approaches about 1.179 for the square wave, 8.95 % of its jump of 2 (Gibbs, 1899). Everything is drawn in your browser.
A fresh daily puzzle every morning, and new tools added every month.
Browse every product