Idea
A Fourier series splits a periodic function into a sum of sine and cosine waves of different frequencies. The low-frequency terms draw the rough outline, and the high-frequency terms fill in the detail. Many common functions with period can be written this way:
The coefficients give the weight of each frequency in . Adding only the first terms gives an approximation of , and the larger is, the closer the fit.
Interaction
- Number of terms N: use the slider to change how many terms are added, and watch the stacked circles approach a square wave or a 2D periodic orbit
- 1D square wave / 2D orbit: switch between the waveform and the path in the plane, and compare how the same harmonics look in the two views
Suggested order: a few harmonics → increase N and watch the fit → compare the oscillation at the discontinuous edges.
What to notice
- A periodic path that is regular enough can be split into a sum of basic frequencies (circular motions).
- The smoother the function, the faster the coefficients decay, and the faster a finite-N approximation gets close to the target.
- At a discontinuity, adding terms still leaves the Gibbs overshoot, about 9% of the jump height.
Comments
Comment with a GitHub account.