---
title: "Photography Optics Playground Interactive Lab | Sandbox Physics"
description: "From one camera position, what do focal length and aperture change in a photo?"
canonical_url: "https://sandboxphysics.com/labs/photography-optics-playground/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/photography-optics-playground/"
last_modified: "2026-10-27"
---

Optics 026 · Imaging, instruments, and visual systems

# Photography Optics Playground

**From one camera position, what do focal length and aperture change in a photo?** Focal length sets how much of the scene fills the frame and how large things appear. The entrance pupil, the lens opening as seen from the front, sets defocus blur, depth of field and diffraction. Perspective depends only on where the camera stands, so from a fixed spot zooming in just gives a crop of the same view.

A 2D full-frame camera bench links a lens carriage that moves with focal length, the entrance pupil, a fixed sensor, ray fans for three depths, calculated spot circles, a depth-of-field threshold, exposure stops and the growth of diffraction. It keeps focal length and perspective separate.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

The camera is a centered, paraxial thin-lens model with a circular pupil, a diffraction scale at 550 nm and the conventional 0.03 mm threshold for the circle of confusion. Aberrations, pupil magnification, focus breathing, distortion, the spectral response of the sensor, motion blur, sampling, demosaicing and full PSF convolution are not included.

Physics tutorial

## Audit the physics of Photography Optics Playground

**Background** The camera model combines the lens equation with an entrance pupil of finite size. The focus distance fixes the sensor distance through $\frac{1}{f}=\frac{1}{u}+\frac{1}{v},\qquad D=\frac{f}{N}$. With the sensor fixed there, rays from any other depth cross in front of it or behind it and land as a spot of finite size.

**Why it matters** From one camera position, what do focal length and aperture change in a photo?

Start with the essentials

- **Focus question**: From one camera position, what do focal length and aperture change in a photo?
- **One-sentence intuition**: Tracing the two pupil edges to the fixed sensor gives the paraxial circle of confusion directly: $c=D\left|1-\frac{v_s}{v_o}\right|$. From a fixed viewpoint, focal length changes the framing and the image scale. Perspective depends on the ratios of object distances, so it changes only when the camera moves or the scene changes.

### Core mathematical model

#### Field of view and entrance pupil

$$
\mathrm{FOV}_h=2\arctan\!\left(\frac{w_s}{2v_s}\right),\qquad D=\frac{f}{N}
$$

The sensor is thirty-six millimetres wide. Its distance from the lens comes from the lens equation for the chosen focus distance, and it approaches the focal length when focusing far away. Changing the f-number changes the diameter of the ray bundle.

#### Depth of field from a conventional blur limit

$$
H=\frac{f^2}{Nc_0}+f,\quad D_N=\frac{Hu}{H+u-f},\quad D_F=\frac{Hu}{H-u+f}
$$

The near and far limits are not sharp physical boundaries of focus. They are the object distances at which the geometric blur on this sensor reaches the conventional threshold.

#### Diffraction tradeoff

$$
d_A\approx2.44\lambda N
$$

Stopping down shrinks the geometric defocus circles but widens the first dark ring of diffraction. The aperture-sweep plot shows both on the same sensor scale.

### Common difficulties

#### Claiming focal length changes perspective

**Typical misconception** A wide lens exaggerates near objects and a long lens compresses distance even when the camera never moves.

**Better mental model** From one viewpoint, two objects of equal height have an image-size ratio set by the ratio of their distances. Changing focal length scales both images together and only crops the frame differently. The familiar perspective change happens when the photographer moves to get the same framing back.

### Run the experiment

1. 01

   #### Scene 1: Fixed-viewpoint framing

   Open fixed-viewpoint framing. Drag focal length and watch the field cone narrow while the displayed perspective invariant stays the same.

   **What to observe:** The focused gold bundle always meets at one point on the sensor, wherever its rays crossed the pupil. The foreground and background bundles stay spread out, defocused in opposite directions.

2. 02

   #### Scene 2: Aperture and defocus

   Switch to aperture and defocus. Sweep the f-number and compare the diameter of the nine-blade pupil, the spread of the five rays on the sensor, and the foreground and background blur.

   **What to observe:** A longer focal length narrows the field of view and enlarges the image, but the size ratio between the near and far objects of equal height stays fixed, because none of the three object distances has changed.

3. 03

   #### Scene 3: Depth-of-field versus diffraction

   Open the depth-of-field versus diffraction scene. Stop down step by step, watch the marked depth range, and find the point where the smaller defocus blur no longer makes up for the growing Airy pattern.

   **What to observe:** A high f-number can bring more of the scene below the conventional blur threshold, yet diffraction still lowers the contrast of fine detail. Depth of field and resolving power are different things.

Physical conclusion

Viewpoint sets perspective and focal length sets framing. Pupil diameter, exact paraxial defocus, the conventional depth-of-field limits, diffraction and sensor position are separate ideas too, but all of them follow from the same numbers.

Waves & optics · Starter path

## From one ray to interference measurement

Start with refraction, find where the ray picture stops working, then use interference to measure tiny distances.

[Start here → **Optical Boundary Explorer** Turn the incident angle and watch reflected and transmitted power trade off. Then switch to the critical-angle scene. Observe · 11 min](https://sandboxphysics.com/labs/optical-boundary-explorer/)

1. [1 Optical Boundary Explorer](https://sandboxphysics.com/labs/optical-boundary-explorer/)
2. [2 Rainbow Caustic Observatory](https://sandboxphysics.com/labs/rainbow-laboratory/)
3. [3 Camera Obscura](https://sandboxphysics.com/labs/camera-obscura/)
4. [4 Coherent Wave Composer](https://sandboxphysics.com/labs/coherent-wave-composer/)
5. [5 Young Double-Slit Bench](https://sandboxphysics.com/labs/young-double-slit-bench/)
6. [6 Michelson Precision Lab](https://sandboxphysics.com/labs/michelson-precision-lab/)

[View the full path →](https://sandboxphysics.com/topics/waves-and-optics/#starter-path)
