The Winding Machine
The first two demos built waves out of known ingredients. This one does the hard part in reverse: given a signal, how do you find the frequencies hidden inside it? The trick is beautiful — and it's the actual definition of the Fourier transform.
The idea: wrap the signal around a circle
Take a signal that wiggles over time. Now wind it around a circle: as time runs, walk around the centre, and let the signal's value push you nearer or further from the middle. Change how fast you wind — the winding frequency — and the wrapped-up shape changes.
Then track one thing: the centre of mass of the wound-up curve (the orange dot). Almost always the curve is spread evenly around the middle, so its centre of mass sits near the origin. But when your winding frequency matches a frequency actually inside the signal, the loops suddenly line up on one side — and the centre of mass lurches outward.
Wind it up ↻
Left: the signal wound around the circle at your chosen frequency, with its centre of mass (orange). Right: how far that centre of mass reaches, for every winding frequency. Drag the slider — or hit Sweep — and watch the spikes line up with the signal's real frequencies.
Why the spikes are the answer
Off a frequency → everything cancels
When the winding frequency doesn't match, the signal's ups and downs get smeared evenly all the way around the circle. They cancel, and the centre of mass barely leaves the middle. Strength ≈ 0.
On a frequency → it all adds up
When you wind at a frequency the signal really contains, every cycle lands in the same place each turn. Instead of cancelling, they stack — and the centre of mass swings far out. That spike says "this frequency is in here."
Read the right-hand plot as a list of the signal's ingredients: a spike at 3 Hz means "there's a 3 Hz wave inside." Switch the signal to 2 + 5 Hz and you get two spikes, exactly where you'd expect. That plot is the spectrum — the same thing the Build-a-Wave sliders showed, now discovered from the wave instead of chosen.
…and that's the transform
"Wind at frequency f and take the centre of mass" is, written in symbols:
The scary part — e−2πi·f·t — is just "a point on a circle, wound at frequency f" (the same circle from Epicycles). Multiplying by g(t) pushes it in and out. The integral is the centre of mass. That's the whole Fourier transform: you've just watched it happen.