Fourier Polynomials

Euler's formula relates the complex exponential function to the circular trig functions: \[ \exp(ix) = \cos x + i\sin x. \] A (period-$1$) Fourier polynomial is a function of the form \begin{align*} f(x) &= \sum_{k=1}^{N} a_{k}\exp(2\pi kix) \\ &= a_{1}\exp(2\pi ix) + a_{2}\exp(4\pi ix) + \dots + a_{N}\exp(2N\pi ix). \end{align*} In the diagram above, $N = 18$, the coefficients $a_{k}$ are real numbers between $-0.5$ and $0.5$, in steps of size $0.005$, and the graph $\bigl(x, f(x)\bigr)$ is plotted (as a space curve) over $-1 \le x \le 1$.

The sliders set the coefficients. The left and right arrow keys “pan” the view point, the up and down arrow keys “roll” the view point, and the buttons reset the view point to lie on one of the coordinate axes.