Fourier Transforms are ubiquitous in mathematical areas which require the decomposition of a function into its constituent frequencies. This work attempts to capture the beautiful piece of mathematics that governs Fourier Transforms and is inspired the video by 3Blue1Brown.

Some of the key features of this work include:

  • Wrapping input signals in a circular fashion to capture the patterns that emerge for varying wrapping frequencies.
  • Visualizing the aligned patterns that emerge when the signal frequency matches the wrapping frequency, indicating one of the constituent pure frequencies of the signal. In these cases, the centre of mass of the image shifts from the origin as explained by 3Blue1Brown, thus illustrating the Fourier Transform's ability to pick out pure frequencies from a mixed signal.
  • Visualization of the square wave and sawtooth wave approximated by their Fourier series.

All images were generated using Python, by using packages like Matplotlib, Numpy and SciPy, the code for which can be found here.

Wrapped Signal Patterns

Images of the input signal cos(θ) wrapped at various frequencies

Wrapping input signal cos(2θ)+sin(10θ), note the unique patterns for frequencies which match the wave frequency, causing a shift in the centre of mass of the pattern.

Square Wave and Sawtooth Wave

Functions can be approximated by their Fourier Transforms. Here, a square wave and sawtooth wave (left) are approximated by computing their Fourier coefficients. The number of Fourier coefficients used determines the degree of approximation obtained. Visualize the approximations obtained for a varying number of coefficients for the square wave and sawtooth wave.

Signal Wrapping Animations

Arbitrary input signals wrapped around at varying frequencies:

Note that the patterns are perfectly aligned when the wrapping frequencies match the signal frequency, thus giving us the constituent pure frequencies from a mixed signal. Thus, the Fourier Transforms are akin to a mathematical machine that can decompose any function into a sum of pure frequency sine and cosine waves.