Fourier Series Builder
compose complex waves from simple sines
how rotating vectors build a waveform 🖖
Each rotating vector contributes one sine component at harmonic index k. Adding vectors tip-to-tail forms the partial sum f_N(x). As N grows, high-frequency content sharpens corners, while near jump discontinuities a bounded Gibbs overshoot remains.
Every repeating wave is a chord of sines 🖖
Fourier's insight: any periodic signal — no matter how jagged — is a sum of pure sine waves whose frequencies are whole-number multiples of one fundamental. The sliders just choose how many of these ingredient tones to stack. In a square wave only odd harmonics appear, each fainter than the last: the 3rd carries 1/3 the amplitude of the fundamental, the 5th only 1/5. Add more terms and the sum sharpens toward the target shape.
The 9% overshoot that never goes away 🖖
Near a jump, the partial sum overshoots by about 8.95% of the jump height — and this spike never shrinks, no matter how many harmonics you add; it only grows narrower. Physicist Albert Michelson met it in 1898 when his mechanical harmonic analyzer kept drawing stubborn spikes at a square wave's edges, and he suspected a machine fault. J. Willard Gibbs proved the hardware was right: the overshoot is real mathematics. The same 'ringing' haunts JPEG images near sharp edges.
Example problems
- square, 1 harmonic - square wave, 1 harmonic — single sine, rough box shape
- square, 10 harmonics - square wave, 10 harmonics — sharp edges with ~9% Gibbs overshoot
- triangle, 8 harmonics - triangle wave, 8 harmonics — smooth convergence (no sharp jumps)
- sawtooth, 10 harmonics - sawtooth wave, 10 harmonics — visible Gibbs ringing at discontinuities