When last we saw [xoreaxeax], he had built a lens-less optical microscope that deduced the structure of a sample by recording the diffraction patterns formed by shining a laser beam through it. At the time, he noted that the diffraction pattern was a frequency decomposition of the specimen’s features – in other terms, a Fourier transform. Now, he’s back with an explanation of why this is, deriving equations for the Fourier transform from the first principles of diffraction (German video, but with auto-translated English subtitles. Beware: what should be “Huygens principle” is variously translated as “squirrel principle,” “principle of hearing,” and “principle of the horn”).
The first assumption was that light is a wave that can be adequately represented by a sinusoidal function. For the sake of simplicity (you’ll have to take our word for this), the formula for a sine wave was converted to a complex number in exponential form. According to the Huygens principle, when light emerges from a point in the sample, it spreads out in spherical waves, and the wave at a given point can therefore be calculated simply as a function of distance. The principle of superposition means that whenever two waves pass through the same point, the amplitude at that point is the sum of the two. Extending this summation to all the various light sources emerging from the sample resulted in an infinite integral, which simplified to a particular form of the Fourier transform.
One surprising consequence of the relation is the JPEG representation of a micrograph of some onion cells. JPEG compression calculates the Fourier transform of an image and stores it as a series of sine-wave striped patterns. If one arranges tiles of these striped patterns according to stripe frequency and orientation, then shades each tile according to that pattern’s contribution to the final image, one gets a speckle pattern with a bright point in the center. This closely resembles the diffraction pattern created by shining a laser through those onion cells.
For the original experiment that generated these patterns, check out [xoreaxeax]’s original ptychographical microscope. Going in the opposite direction, researchers have also used physical structures to calculate Fourier transforms.

Partially related video by Ben Krasnow https://www.youtube.com/watch?v=wcRB3TWIAXE
Not to pick nits, but the JPEG algorithm uses the discrete cosine transform, not sines.
So there is this area of study called Fourier optics. For geeks who love Fourier transforms I highly recommend reading about it. Even lenses do Fourier transforms.
True, even plain lenses have a Fourier focal plane. And there is a subfield and some commercial products based on processing light in that Fourier space using spatial light modulators: They can do real-time (speed of light…) highpass/lowpass filtering, mask generation, artifact removal and other neat tricks.
Maybe the simplest example of this is the pinhole spatial filter that removes the higher order frequency components in a beam, leaving just the clean “DC” zeroth order.
For anyone curious the last example Paul is talking about is often searched for under the terms “spatial filtering”
If you work in semiconductor lithography, then lenses are not much more than Fourier transformers (though transforming by phase rather than frequnecy.)
Can anyone understand how he solves for the inverse Fourier Transform to get back to image space using only the amplitude of the Fourier Transform? That’s quite a trick, and I couldn’t understand it completely from the video.
He didn’t recover phase — the phase was never lost, because the Fourier plane was never measured; only free propagation occurred.
I didn’t watch the video, but possibly it is using the DCT, which has real-valued output and input.