The Lens as a Fourier Engine

The last module ended on a sobering ledger: photonic accelerators fight for every femtojoule against electronics that has had sixty years of practice (energy per MAC). This module changes the rules of the game. Instead of building optical versions of digital operations, it asks: what does light compute anyway, just by propagating? The answer is startling. A single piece of curved glass — a lens, the oldest optical component there is — computes a full two-dimensional Fourier transform of whatever field you place in its front focal plane, and delivers the result in its back focal plane. Every pixel, every spatial frequency, all at once, in the time light takes to fly two focal lengths. A megapixel FFT is billions of multiply–accumulates on a digital chip; the lens does the equivalent job with zero marginal energy, because nothing switches — the light simply passes through.

This lesson establishes the claim, sketches why it is true, and then reads the fine print — because "free" in physics always has a price, and finding out where the price moved to is the recurring plot of this whole module.

Direction in, position out

The physical intuition needs no equations. Any field you can draw — a transparency, a modulated beam, an image — can be decomposed into plane waves, each travelling in a slightly different direction. That is exactly what the Fourier transform of a field means optically: the component at spatial frequency f_x is a plane wave tilted by an angle \theta \approx \lambda f_x. And a lens does one thing supremely well: it takes every bundle of parallel rays and brings it to a point in its focal plane, at a position proportional to the bundle's arrival angle. Parallel rays in, point out. So the lens is a direction sorter — and since direction is spatial frequency, it is a spatial-frequency sorter. The brightness landscape across the back focal plane is the input's spatial-frequency content, laid out for inspection.

Coarse features of the input — slow variations, low frequencies — correspond to nearly-axial plane waves and land near the centre. Fine detail — sharp edges, small structures — diffracts to steep angles and lands far out. The very centre of the pattern is the f_x = 0 component: the plain average brightness of the input.

The derivation, sketched

The rigorous route runs through Fraunhofer diffraction, which you have already met: in the far field, the diffracted amplitude from an aperture is proportional to the Fourier transform of the aperture's transmission. The problem with the far field is that it is far — metres or kilometres for fine structure. The lens's job is to fold infinity back to arm's length. A thin lens of focal length f multiplies the field crossing it by a quadratic phase \exp\!\big[-\tfrac{ik}{2f}(x^2+y^2)\big] — thicker glass in the middle delays the middle — and that phase factor is precisely the one that converts the Fresnel propagation integral into the Fraunhofer one. Propagate a field U_0 one focal length to the lens, through it, and one focal length beyond, and the quadratic phases cancel exactly, leaving:

Note what did the work: free-space propagation performs the Fourier integral (every input point radiates to every output point — a physically parallel all-to-all sum), and the lens merely cancels the residual curvature so the answer lands cleanly at finite distance. The computation is not "in" the glass; it is in the propagation. The glass is bookkeeping.

Worked example: reading the focal plane with a ruler

A transparency with a fine grating of period d = 10\ \mu\text{m} sits in the front focal plane of an f = 100 mm lens, illuminated by a HeNe laser at \lambda = 633 nm. A grating of period d has its power at spatial frequency f_x = 1/d, so its first-order spot lands at

u \;=\; \lambda f\, f_x \;=\; \frac{\lambda f}{d} \;=\; \frac{0.633\ \mu\text{m} \times 100\ \text{mm}}{10\ \mu\text{m}} \;=\; 6.33\ \text{mm},

a distance you can measure with a ruler. Micrometre-scale structure in the input becomes millimetre-scale structure in the transform — the lens is also a magnifier of frequency space. The chart below shows the focal-plane intensity for a single slit of width a: the classic \mathrm{sinc}^2 power spectrum. Widen the slit and watch the transform narrow — the Fourier reciprocity you proved with integrals, now enacted by glass:

Now the cost accounting that motivates this whole module. Run the comparison:

// A 4096×4096 complex Fourier transform: digital vs a lens. const N = 4096; // 2-D FFT ≈ N² · log2(N²) complex MACs (row and column passes). const macs = N * N * 2 * Math.log2(N); console.log("FFT complex MACs: " + macs.toExponential(2)); const pJperMAC = 1; // an optimistic digital accelerator const fftJ = macs * pJperMAC * 1e-12; console.log("FFT energy at 1 pJ/MAC: " + (fftJ * 1e6).toFixed(0) + " µJ per transform"); // The lens: light flies 2f. Marginal energy of the transform itself: 0. const f = 0.1; // 100 mm focal length, in metres const c = 3e8; console.log("lens transit time: " + ((2 * f / c) * 1e9).toFixed(2) + " ns, marginal energy: 0 J"); // But the answer must be READ. Detecting each output pixel with ~1000 photons (633 nm): const photonJ = 3.14e-19; const detectJ = N * N * 1000 * photonJ; console.log("light energy to read the result: " + (detectJ * 1e9).toFixed(1) + " nJ"); // ...and digitised. At ~1 pJ per ADC conversion: const adcJ = N * N * 1e-12; console.log("ADC energy to digitise it: " + (adcJ * 1e6).toFixed(1) + " µJ");

The transform costs microjoules digitally and nothing optically — but reading the answer back out costs microjoules again. Hold that thought; it is the punchline of the "Watch out!" below, and of the last lesson of this module.

It doesn't, and that is the deep part. Fourier's integral is a sum over all input points of contributions weighted by a phase that rotates linearly with position — e^{-2\pi i x u/\lambda f}. Physics performs exactly this sum without being asked: by Huygens' principle every point of the input field radiates a spherical wavelet, every wavelet reaches every point of the focal plane, and the lens's shape arranges that the accumulated path length from input point x to output point u grows linearly with the product xu. Superposition adds the wavelets — complex amplitudes, phases and all — and the interference pattern that results is the value of the integral, evaluated at every output point in parallel. No part of the apparatus represents a number, executes a multiplication, or stores a partial sum. The "computer" is the wave equation itself; the lens only chooses which of its solutions gets displayed. This is the purest example of a theme you will see all module: analog optical computing means finding a physical system whose natural evolution happens to be the mathematics you wanted done.

"Zero energy, speed-of-light latency" is true only of the middle of the sandwich. To use the lens as a processor you must first load the input: encode your data onto the optical field with a spatial light modulator, which has a refresh rate (kilohertz for liquid crystal, tens of kilohertz for micromirrors) and an electrical drive cost per pixel. Then you must read the output: a camera integrates photons, converts them, and pushes millions of ADC conversions per frame at picojoules each. Both steps cost orders of magnitude more time and energy than the propagation they bracket, and neither improves at the speed digital logic did. Worse, a square-law detector records |\tilde U_0|^2 — the power spectrum — and silently discards the transform's phase, which for images carries most of the structural information; recovering it needs interferometric (holographic) detection, which is lesson 3's business. The honest statement is: a lens makes the Fourier transform's marginal cost zero, and moves the whole bill to I/O. Whether that trade wins depends entirely on how much computing you can do optically per load–read cycle — the question the next lesson answers by stacking a second lens.

Where this goes next

One lens gives you the spectrum of an image, live, at zero marginal cost. The genuinely powerful move is to act on that spectrum while it exists as light — multiply it by a mask — and then transform back with a second lens. That is convolution and correlation by transparency, the 4f correlator, the closest thing analog optics has to a killer app — and the subject of the next lesson.