A square wave with amplitude 1 and wavelength can be approximated by the Fourier expansion

,

a sum of sines with amplitudes and frequencies .

This Demonstration uses an open five-bar linkage to represent Fourier approximations of increasing accuracy. The bar of the linkage has length and rotates at angular speeds around its joint with the preceding bar.

The ordinates of the joints represent progressive approximations to the sum, as you can see by operating the time gauge.