Discrete Fourier Transform

If we use complex numbers for the plane, then points of the form $Z_0 + Re^{i\theta}$, where only theta is allowed to vary, will lie on the circle with radius $R$ centered at $Z_0$. Looking at the expression for a discrete Fourier Transform \[ X_k = \sum_{n=0}^{N-1}x_n e^{\frac{2\pi i k n}{N}} \] we can then interpret the transform as a decomposition of a path $\{x_n\}$ in two dimensions into the same path explained by epicycles -- circles orbiting other circles. In the above simulation, you can draw an arbitrary path and see how the circles obtained from the discretized fourier transform approximates the curve. When you choose as many circles as points along the curve, then all points coincide.

Use SPACE to remove the path, and ENTER to remove the path drawn by the epicycles.