In only JS, this uses the Discrete Fourier Transform (DFT) on a random image. The DFT is a mathematical tool that takes data (like a row or column of pixel values) and reconstructs it by summing a bunch of independent waves. Like sin(x) and cos(x)
Pixel DFT
- This dropdown applies the DFT to the selected pixel row or column.
- K terms controls how many Fourier terms are used. At max K, the wave reproduces the image data 100%.
- Exaggerate scales the wave amplitudes. When exaggerate == 1, the waves represent the true data; higher values just boost.
Instanced DFT
- This shows all the individual waves that combine to form the signal.
- The waves animate, this part isn’t mathematically accurate
. - This uses instanced lines, which was a first for me.


