Skip to main content
Sandbox Physics

Fourier series · rotating vectors

Fourier Epicycles

Each Fourier term is a rotating vector. Connect them head to tail and the final tip traces a curve; add more terms and a wobbly approximation locks onto the target wave.

Interactive modelFourier Epicycles
Target waveSquare
Terms NN6
Base frequency ω0\omega_01.00 rad/s
Composite value+0.00

Physics tutorial

Fourier series: decompose shape into frequency

BackgroundUnder broad conditions, a periodic signal can be represented as a sum of sines and cosines at integer multiples of a base frequency. Epicycles show the same decomposition in the complex plane.

Why it mattersA spectrum turns sound, images, vibration, and communication from shape problems into questions about how much of each frequency is present.

Start with the essentials

Focus question
How can vectors moving only in uniform circles draw a square wave with sharp corners?
One-sentence intuition
Large slow components carry the broad shape; small fast components supply edge detail.

Core mathematical model

Fourier series

f(t)=a02+n=1[ancos(nω0t)+bnsin(nω0t)]f(t)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\left[a_n\cos(n\omega_0t)+b_n\sin(n\omega_0t)\right]

Each nn is an independent harmonic whose coefficients set magnitude and phase.

Odd harmonics of a square wave

fN(t)=4πn=1,3,5Nsin(nω0t)nf_N(t)=\frac{4}{\pi}\sum_{n=1,3,5}^{N}\frac{\sin(n\omega_0t)}{n}

A square wave uses odd harmonics with amplitudes falling as 1/n1/n.

Common difficulties

More terms do not remove all overshoot

Typical misconceptionA sufficiently large N makes convergence smooth everywhere.

Better mental modelGibbs overshoot becomes narrower near a jump, but its relative height does not simply vanish.

Frequency and circle size are separate

Typical misconceptionA faster circle must also be larger.

Better mental modelHarmonic number sets rotation rate; the Fourier coefficient sets radius.

Run the experiment

  1. 01

    Keep only the fundamental

    Choose Square and set N to 1.

    What to observe: The output is only a smooth sine wave.
  2. 02

    Add high frequencies

    Increase N slowly.

    What to observe: Flat tops and steep edges emerge as small circles add detail.
  3. 03

    Compare coefficient decay

    Switch among square, sawtooth, and triangle waves.

    What to observe: Smoother waveforms lose high-frequency content faster.