OPTICSIN 5 MINUTES

E02 / AN INTERACTIVE OPTICS LESSON

A direction enters.
A position lights up.

A lens sorts plane waves into focal spots. A second lens turns that spectrum back into an image—and lets you edit it along the way.

12–15-minute lesson · 25–30-minute Python lab
Prerequisites & recommended learning resources ↓

Computed illustration from this lesson’s numerical model.
COMPUTED FROM THE LESSON MODEL

CONCEPTS IN THIS EPISODE

See this episode in the concept map ↓

E02 / WHY LEARN THIS?

Can you filter an image before the camera sees it?

Suppose you want to suppress fine texture, emphasize boundaries, or reveal a nearly invisible transparent object. A lens gives you access to the spatial frequencies of the field, so a mask placed between two lenses can change which features reach the camera.

What you gain: Choose where to place a filter and predict its effect on amplitude and phase objects, including which image detail the filter removes.

BEFORE E02 / PREREQUISITES

Check your starting point.

Useful earlier lessons: E01

  • Complex amplitudes and phase. Follow a position-dependent phase multiplying a complex field.Used here: A thin lens changes the wavefront before free-space propagation.
  • Fourier transforms and convolution. Recognize spatial frequency, the Fourier shift property, and two successive transforms.Used here: These connect illumination direction, focal-plane position, and the inverted 4f image.
Need a refresher? Open the recommended reading.

Use the indicated sections for an unfamiliar idea, then return to this lesson.

For the notebook: Use 2D FFTs and distinguish a frequency-bin coordinate from a focal-plane coordinate.
NumPy · The absolute basics for beginners ↗ · NumPy · Discrete Fourier Transform ↗

Developed in this lesson: Connect a lens's Fourier plane to spatial filtering and phase contrast.

Browse all prerequisites and learning resources →

Why a lens computes a Fourier transform

Watch the story, then use the experiment below to test the ideas yourself.

5:13 · E02 · Why a lens computes a Fourier transformWatch on YouTube ↗

The film’s logic, step by step.

Why can a lens reveal a field’s Fourier spectrum just one focal length away?

Follow the film’s argument, then open an explanation where a step feels too fast. Times are approximate; select one to replay that part of the film.

Logic flow

  1. 0:00

    Ask why an F turns into fringes

    The far-field pattern differs from the object. E01 supplies the explanation’s starting point: each spatial frequency corresponds to a plane-wave direction.

  2. 0:24

    Map directions to positions in the far field

    At sufficiently large distance, the angular distribution becomes a spatial pattern. The Fraunhofer condition makes the input’s quadratic phase negligible.

  3. 1:11

    Expose the Fourier kernel inside the path length

    Expanding (x − x′)² separates an output phase, the Fourier cross term, and an input chirp. That last term explains why the nearby pattern is not yet the simple Fourier transform.

    Open the missing step →
  4. 2:00

    Use the lens to cancel the unwanted chirp

    A quadratic lens phase cancels the input chirp at z = f. Directions are sorted into focal-plane positions, bringing the far-field operation onto a table.

    Open the missing step →
  5. 2:48

    Transform twice, then edit the middle plane

    A second lens produces an inverted image. A mask between the lenses changes chosen frequencies before they recombine, giving low-pass or high-pass filtering.

    Open the missing step →
  6. 3:20

    Convert weak phase into visible brightness

    A transparent object changes phase more than amplitude. Shifting the unscattered reference at the Fourier-plane centre makes that weak phase interfere as a first-order intensity change.

    Open the missing step →
  7. 3:53

    Choose the numerical propagator by its sampling

    Angular spectrum, Fresnel, and Fraunhofer share Fourier structure but use different approximations and grids. Chirp sampling, output spacing, and aperture size decide which is reliable.

  8. 4:44

    Carry the finite pupil into the next question

    A real lens accepts only a finite range of directions. That missing portion of the spectrum leads directly to the blur and resolution limits in E03.

Unpack the difficult steps

Which phase does the lens cancel, and what does the camera measure?

1:18 · Replay this part

(x − x′)² = x² − 2xx′ + x′²
U(x,z) ∝ e^(ikx²/2z) ∫ U₀(x′) e^(ikx′²/2z) e^(−ikxx′/z) dx′

The last factor is the Fourier kernel. With the object just before the thin lens, multiply U₀ by exp(−ikx′²/2f). At z = f this cancels the input quadratic factor. An output quadratic phase remains, but its magnitude is one, so the camera records the squared magnitude of the Fourier transform.

Putting the input and output in the front and back focal planes removes that residual quadratic phase, up to overall factors. This is exact within the ideal thin-lens, paraxial model. The linear mapping is x ≈ f kx/k; high-angle systems require a more careful lens model.

Why do two Fourier transforms invert the image?

2:55 · Replay this part

Using the same sign in both transform kernels reverses the coordinate. The inverse transform would use the opposite sign. Two ordinary lenses implement the same transform convention, so an equal-focal-length 4f system maps x to −x, with overall amplitude and phase factors.

ℱ{ℱ{U}}(x) ∝ U(−x)
Uout(x) ∝ ℱ{M(kx) · ℱ{Uin}}(x)

A central pinhole removes high spatial frequencies from the field, broadening sharp features. Blocking the centre removes slowly varying components and emphasizes edges. These are coherent field operations; taking intensity comes after the fields recombine.

How can a quarter-wave phase shift reveal a transparent object?

3:20 · Replay this part

U ≈ 1 + iφ, |U|² ≈ 1 + O(φ²)
Uafter ≈ i + iφ = i(1 + φ), |Uafter|² ≈ 1 + 2φ

For a weak, real phase φ, the object adds a small field perpendicular to the strong unscattered field. Their first-order intensity cross term is initially zero. Delaying the unscattered field by π/2 rotates that strong reference into alignment with the small field, making the cross term linear in φ. The opposite shift reverses the contrast.

This sketch assumes weak phase and a phase plate that separates the reference from the scattered spectrum. A finite phase ring, extended illumination, and strong phase objects introduce effects such as halos; the two-arrow picture is the mechanism, not a complete microscope model.

Explore the full experiment →

What to notice first.

A plane wave is a direction with a phase. A finite lens collects only a limited patch of that wave, so it produces a finite focal spot rather than a mathematical point. Change the wave’s direction and the spot moves. The focal plane therefore turns an angular spectrum into a spatial pattern you can inspect.

x_f = λf fₓ ≈ f sin θ

Here f is focal length, fₓ is transverse spatial frequency in cycles per unit length, and x_f is position in the focal plane. This relation belongs to the paraxial Fourier model. Doubling f doubles the spot displacement and also broadens the diffraction scale of a fixed entrance aperture. A larger picture in that plane does not create new information.

Why a Fourier transform? Free propagation contains a quadratic phase, often called a chirp. A thin paraxial lens supplies the opposite quadratic phase. At the focal distance, one quadratic term cancels and the remaining cross term is the Fourier kernel. Placing the object in the front focal plane removes an additional coordinate-dependent phase, giving the standard front-to-back focal-plane transform.

This page separates two demonstrations. The upper curve has physical wavelength, focal length, and tilt units. The sampled letter experiment below uses dimensionless pixel coordinates so that you can inspect Fourier filtering without confusing image sampling with magnification.

By the end, you can

  1. Convert transverse spatial frequency into a focal-plane coordinate.
  2. Explain why two Fourier transforms invert an image.
  3. Predict how Fourier-plane masks change amplitude and phase objects.

PREDICT BEFORE YOU CHANGE A CONTROL

Tilt the incoming plane wave without moving the lens. Which way should the focal spot move? Then predict what a central stop will do to an amplitude image.

Change one thing.
Follow what changes.

All plotted fields and curves are calculated from the stated model. Keep the other controls fixed while testing a prediction.

Model: Coherent monochromatic scalar illumination, ideal paraxial lenses, and thin Fourier masks. The focal-spot panel uses a Gaussian entrance field. The 4f panel is a periodic sampled field; no aberrations, finite detector pixels, or noise are included.

  1. Move the tilt through zero. Double focal length and compare the predicted spot displacement while leaving the incoming wave unchanged.
  2. Select the amplitude object and no mask. Locate the inverted F, then insert the low-pass aperture and central stop.
  3. Switch to the transparent phase object. Its input intensity is uniform. Apply the π/2 phase disk and explain why structure becomes visible.

Filter the field before you square it.

A 4f system has two lenses and a shared Fourier plane. The first lens produces the object’s complex spectrum. A mask multiplies that spectrum. The second lens applies another forward Fourier transform, returning an inverted spatial field. The camera finally records its squared magnitude.

U_out ∝ F{ M · F[U_in] }   ·   I_out = |U_out|²

With no mask, two transforms map x to −x, apart from coordinate scaling and overall phase. A low-pass mask keeps only slowly varying field components and spreads sharp edges. A central stop removes low frequencies, including much of the smooth background. The remaining field often emphasizes changes, but its recorded intensity is not simply the signed derivative of the original picture.

A transparent object can still change light.

A thin phase object multiplies the field by eiφ(x,y). Its intensity may be uniform even when φ varies. For a weak object, eiφ ≈ 1 + iφ: an unscattered background and a small scattered contribution are approximately a quarter-cycle apart. Their first-order intensity contrast is then small.

A small phase disk near the Fourier origin changes the phase of the background relative to the scattered field. Their interference can turn phase variation into visible intensity contrast. The disk does not read an absolute optical phase; it creates a relative-phase measurement. Its finite size also affects low-frequency scattered components, so the resulting image is not an exact quantitative phase map.

Coordinates are part of the algorithm.

For an N-point input sampled at Δx, Fourier bins are separated by Δfₓ = 1/(NΔx). In the focal plane, Δx_f = λf/(NΔx). Relabeling the FFT with the input coordinates is a common mistake. The notebook checks this scaling and the reversal explicitly, then examines how quadratic phases can be undersampled.

Make a prediction before checking the explanation.

Can you explain the change?

1. At fixed illumination direction, doubling f makes the focal displacement…
2. An unfiltered equal-focal-length 4f system produces…
3. A phase disk reveals a weak phase object mainly by…

Your own computational experiment.

The standalone notebook builds the model in small steps, draws the results, and checks the calculation against independent predictions. It runs on CPU using NumPy, SciPy, and Matplotlib. No repository clone, GPU, or external dataset is needed.

In Colab, sign in with a Google account and select Runtime → Run all. Save a copy in Drive to retain edits. Saved notebook outputs and downloadable PNG figures provide a fallback if Colab’s output frame cannot load.

A short lab report

  1. Calibrate the Fourier plane. Predict the focal coordinate of a known spatial frequency for two focal lengths.
  2. Compare three masks. Save unfiltered, low-pass, and central-stop images with the same intensity scale.
  3. Make phase visible. Compare a weak phase object before and after a central π/2 phase shift.
Compare your reasoning

Calibrate the Fourier plane

Use x_f = λf fₓ with consistent units. The frequency grid and physical focal grid are not the same axis.

Compare three masks

The mask acts on the complex field spectrum. Squaring after filtering makes coherent image formation nonlinear in input intensity.

Make phase visible

The small scattered field interferes differently with the rotated background. Finite disk size and strong phase shifts limit the weak-object interpretation.

Optional deeper extension

Compute front-to-back focal-plane propagation with Fresnel operators, inspect residual quadratic phase, and compare the physical output coordinates with FFT-bin labels.

The notebook marks the extension clearly. Complete the core experiment and its checks first.

Instructor notes and assessment rubric ↗ · Model, setup, and reproducibility ↗

Know what the model leaves out.

Coherent monochromatic scalar illumination, ideal paraxial lenses, and thin Fourier masks. The focal-spot panel uses a Gaussian entrance field. The 4f panel is a periodic sampled field; no aberrations, finite detector pixels, or noise are included.

Video companion: watch the E02 film above (5:13).

Calculations and concept checks run locally in your browser. Quiz answers are not uploaded or stored.

Keep exploring from this episode.

Highlighted concepts appear in this episode. Select any concept to find related episodes.

In this episodeUnderstanding foundationCross-topic connection

Connections describe ideas, not a required episode order.

SELECTED CONCEPT

Complex field & phase

In this episode

Keep amplitude and phase together to describe what light does before a detector measures intensity.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Fourier representation

In this episode

Describe a field by its spatial-frequency components. The same representation connects propagation, imaging, reconstruction, and design.

Other episodes with this concept

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Wave propagation

In this episode

Follow a field through space by advancing its components and combining them again.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Interference & coherence

Connect field correlations to what survives a camera's averaging: interference, fringe visibility, and speckle.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Imaging & resolution

In this episode

Use point responses and frequency transfer to understand which details an optical image can carry.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Holography & phase recovery

Recover information about an optical field using a reference or constraints on intensity measurements.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Phase control

In this episode

Turn a desired phase profile into an optical element, then examine wrapping, quantization, and wavelength dependence.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Periodicity & band gaps

Use repetition to connect diffraction directions, Bloch propagation, and frequency bands that a structure rejects.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Eigenmodes & resonance

Find field patterns adapted to an operator or structure. Related eigenvalue methods also describe Bloch waves and statistical coherent modes.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Sampling & discretization

Understand what changes when continuous fields become arrays: sampling limits, computational windows, and derivative approximations.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Maxwell & FDTD

Evolve coupled electric and magnetic fields on a grid, and test the accuracy of time steps and boundaries.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas

SELECTED CONCEPT

Adjoints & inverse design

Use a scalar objective and an adjoint calculation to find how every design parameter changes the result.

Other episodes with this concept

Explore through connected ideas

Foundations & connections

Refresh the foundations

Connected ideas