A wave from spinning circles
Pin a circle to a board and let it turn at a steady rate. A point on its rim rises and falls, and its height traced against time is a sine wave, the smoothest kind of repeating wave there is. Now pin a smaller circle to that point and let it turn three times as fast. The rim of the second circle rides on the first, so its height is the sum of two sine waves. Keep going, each circle riding on the rim of the one before, and you have a chain of epicycles: circles on circles, the device ancient astronomers used to describe the wandering paths of the planets.
In the Scene the first circle sits on the left of the board. The glowing bead at the end of the chain is the tip, and a dashed line carries its height across to the graph on the right, where a second bead rides the curve the tip draws over two turns of the first circle.
Adding sines to make a square wave
With one term the tip draws a plain sine wave. Add a second circle a third the size, spinning three times as fast, and the hump flattens on top. Add a fifth-size circle turning five times as fast, then a seventh, and the wave squares up: flat tops, flat bottoms, and steep sides between them. The recipe is
4/π × (sin t + sin 3t/3 + sin 5t/5 + sin 7t/7 + …)
Each piece is called a term, and the whole endless sum is a Fourier series, after Joseph Fourier, who used sums of sines to work out how heat spreads through a solid in the early 1800s. His bold claim was that almost any repeating wave can be built this way, if you choose the sizes of the sines correctly. Each sine has a frequency, how many times it repeats in one period of the wave, and a size, called its amplitude. A Fourier series lists the amplitude for each frequency.
Try it: slide Terms down to 1 and watch the single circle draw a sine wave. Then slide it to 3, and on up to 15, and watch the flat tops appear as the small, fast circles are added.
Different waves, different recipes
Change Wave and the circles change size. The Sawtooth rises steadily and then drops all at once; it uses every whole-number frequency, with sizes 1, 1/2, 1/3 and so on, alternately added and subtracted. The Triangle goes up and down in straight lines with sharp corners but no jumps; it uses only odd frequencies again, but their sizes shrink much faster, as 1, 1/9, 1/25, the squares of the odd numbers. With the triangle chosen the later circles are so small they are hard to see, and a handful of terms already gives a close match.
The pattern is general. The smoother a wave is, the faster its circles shrink and the fewer terms it needs. A sudden jump needs fast circles of real size, so the terms of the square and sawtooth waves shrink only as 1 over the frequency.
The spike that never goes away
Slide Show the sines towards Sines inside. First the separate sines appear on the graph, each in the colour of its circle, so you can see that the square-looking curve really is nothing but smooth waves added up. Then the target wave itself appears as a thin chalk line, and finally amber beads mark the highest and lowest points of the sum.
Those beads sit right beside the jumps, and they stick out above the flat top. Add more terms and the spike gets narrower, squeezed closer to the jump, but it does not get shorter. For the square wave the sum peaks at about 1.18 when the wave’s top is 1, an overshoot of about 9% of the full jump from −1 to 1, whether you use 5 terms or 5,000. The sawtooth creeps towards the same 9% more slowly. This stubborn overshoot is called the Gibbs phenomenon, after Josiah Willard Gibbs, who described it in 1899; Henry Wilbraham had found it in 1848.
It does not mean the series fails. At every single point away from a jump, the sum gets as close to the wave as you like if you add enough terms; the spike just moves ever closer to the jump. But no finite number of smooth sines can make a perfectly sharp step, so the sum always rings beside one. The triangle has no jumps, and its sum never overshoots at all.
Where Fourier series turn up
Breaking a signal into sines is one of the most useful ideas in science. The sound of a violin and a flute playing the same note differ in the sizes of their higher frequencies, called harmonics. Music and picture compression, such as MP3 and JPEG, store the large terms and drop the tiny ones the ear or eye will not miss, and the Gibbs ringing shows up as faint ripples beside sharp edges in a heavily compressed photo. Engineers analyse vibrations in bridges and engines the same way, and the method extends from repeating waves to any signal, where it is called the Fourier transform.
What this model leaves out
The Scene uses only sine terms, because all three waves are arranged to be odd (turned half a turn about the centre, their shape below the axis matches the shape above). A general wave also needs cosine terms and a constant, which would be circles that start at a different angle. The Scene stops at 15 terms; the true series has infinitely many, and its sum is exactly the wave everywhere except at the jumps themselves, where it settles on the midpoint. The circles all turn the same way, which is one of several ways to draw a Fourier series with circles. The graph is computed from the formula at 1,200 points across two periods, so for 15 terms the very tip of the narrow spike may be drawn slightly short; the peak value on the label is calculated exactly.
