The photography workbench · 03

A little focus.
A different feeling.

Explore how your lens, sensor and distances shape the background. Two cameras. One little garden. Change a setting and watch the difference.

How this simulation works ↓

AI-generated garden, stone paving and fictional adult portrait. The portrait and wall are flat layers; the ground is projected in perspective. The woman is modeled as approximately 1.70 m tall; the lights are ideal point sources. All calculations and rendering run in your browser.

Behind the blur

What you’re actually seeing.

Framing is part of the comparison.

Changing sensor size with the same lens changes how much of the scene you capture. Matching the framing by changing the lens keeps the viewpoint fixed. Moving the camera instead changes the relative size of the subject and background.

A sharpness range, not a sharp boundary.

The lens is focused on the portrait subject. Sharpness falls away continuously in front of and behind it. The depth-of-field range marks where calculated blur stays below your chosen acceptable threshold.

Blur amount ≠ bokeh character.

We calculate the diameter of a defocused point using thin-lens geometry. Real lenses also have aperture blades, aberrations, focus breathing and optical vignetting. Their bokeh can look different even with the same settings.

An educational approximation.

The generated woman and wall each occupy one depth plane. Generated paving forms a horizontal ground plane with approximate contact shadows and depth-dependent Gaussian blur. The preview approximates circular-aperture blur with sampled layers; it does not reconstruct a complete 3D scene. Diffraction, lens coverage, minimum focus limits, exposure, film grain and sensor noise are not modeled.

The equations we use

With focal length f, f-number N, focus distance s and object distance z, all lengths in millimetres:

Blur diameter = f² × |z − s| ÷ [N × z × (s − f)]

Image distance is v = fs / (s − f). A physical object of width L projects to vL / z on the sensor. Preview blur diameter equals sensor-plane blur divided by active sensor width, multiplied by preview width.

For acceptable blur c, let K = f² / (Nc). The near limit is sK / (K + s − f); the far limit is sK / (K − s + f), or infinity when that denominator is zero or negative. These are ideal geometric results.

Research & sources