---
title: "Camera Obscura Interactive Lab | Sandbox Physics"
description: "What size of pinhole gives the sharpest picture? The sharpest pinhole is close to the size where two kinds of blur are equal."
canonical_url: "https://sandboxphysics.com/labs/camera-obscura/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/camera-obscura/"
last_modified: "2026-10-27"
---

Optics 025 · Imaging, instruments, and visual systems

# Camera Obscura

**What size of pinhole gives the sharpest picture?** The sharpest pinhole is close to the size where two kinds of blur are equal. A bigger hole blurs the image because each object point lights a patch at least as wide as the hole. A smaller hole blurs it by diffraction and lets in less light: halve the diameter and you need four times the exposure.

A 2D section of an optical bench ties everything to one physical pinhole: the inverted image of an object at finite distance, magnification that changes as the screen moves, the exact geometry of the aperture footprint, the diffraction scale of a circular aperture, throughput in exposure stops and a live sharpness envelope built from three curves.

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

The geometric footprint and the far-field Airy diameter are valid asymptotic scales. Combining them as a root sum of squares (RSS) does not solve full near-field Fresnel diffraction. Flux losses other than those set by aperture area, vignetting, scattering in the material, the finite source spectrum, screen response and detector sampling are not included.

Physics tutorial

## Audit the physics of Camera Obscura

**Background** Geometrically, a camera obscura is a central projection of objects at a finite distance. With the object at distance S in front of the hole and the screen at distance L behind it, similar triangles give $y'=-\frac{L}{S}y$. The minus sign means the image is inverted. Moving the screen changes the image size, even though there is no lens.

**Why it matters** What size of pinhole gives the sharpest picture?

Start with the essentials

- **Focus question**: What size of pinhole gives the sharpest picture?
- **One-sentence intuition**: A hole of finite size blurs each point into a geometric spot, and diffraction adds a blur that grows as the hole shrinks: $b_g=d\!\left(1+\frac{L}{S}\right),\qquad b_A\approx\frac{2.44\lambda L}{d}$. Setting the two equal gives the marked crossover. The near-field transition between the two limits needs Fresnel propagation, and it has no single universal numerical prefactor.

### Core mathematical model

#### Inversion for an object at finite distance

$$
m=\frac{y'}{y}=-\frac{L}{S}
$$

Every solid chief ray passes through the same hole. The three object points therefore land on the screen in reversed vertical order, and moving the screen scales their separations by the same ratio.

#### Geometric blur from a finite hole

$$
b_g=d\!\left(1+\frac{L}{S}\right)
$$

Tracing rays past both edges of the hole gives the extra factor for an object at finite distance, so the blur is larger than the hole itself. It approaches the hole diameter only when the object is very far away.

#### Diffraction scale and crossover

$$
b_A\approx\frac{2.44\lambda L}{d},\qquad d_{\times}=\sqrt{\frac{2.44\lambda L}{1+L/S}}
$$

The first expression is the diameter of the first dark ring in the far-field pattern of a circular hole. The second just sets the two limiting diameters equal, so it is a crossover, not an exact optimum.

### Common difficulties

#### Treating one pinhole constant as universal

**Typical misconception** The sharpest hole always equals one fixed coefficient times the square root of wavelength and screen distance.

**Better mental model** That form is a useful scaling law, but its coefficient depends on how you define sharpness, the object distance, the spectrum and the Fresnel regime. This Lab shows the two limiting blur sizes, their crossover and the Fresnel number, so you can see those dependencies.

### Run the experiment

1. 01

   #### Scene 1: Geometric footprint

   Start with the geometric-footprint scene. Increase the hole diameter and compare the gain in exposure from the larger area with the widening spots on the screen.

   **What to observe:** Doubling the hole diameter gains two exposure stops through the larger area, but it also doubles the geometric spot for a distant object. Brightness and sharpness do not improve together.

2. 02

   #### Scene 2: Asymptotic crossover

   Enter the crossover scene. Drag the screen and verify that image magnification, finite-object geometric blur, diffraction scale, and the marked crossover all move together.

   **What to observe:** Moving the screen farther increases image size and both blur scales. The finite-object geometric term grows slightly faster than simply copying the hole diameter.

3. 03

   #### Scene 3: Wavelength-resolved diffraction

   Select wavelength-resolved diffraction, shrink the hole, and compare the blue, green, and red first-zero rings with the rising effective f-number.

   **What to observe:** With the smallest holes, the red ring is the largest because diffraction blur grows with wavelength. The colors separate this way even though the chief-ray projection is the same for every wavelength.

Physical conclusion

No single pinhole formula covers a camera obscura. Keep the pieces apart: the exact inverted projection, the geometric blur from a finite hole, the diffraction limit, the exposure set by the hole area, the enlarged display and the Fresnel transition, which this Lab does not model.

Starter path · Step 3 of 6

## From one ray to interference measurement

[Next step → **Coherent Wave Composer** Set two waves to opposite phase and watch the phasor sum close. Then add more waves. Model · 11 min](https://sandboxphysics.com/labs/coherent-wave-composer/)

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)
