How Lens Simulator works

Lens Simulator is a free, interactive lens comparison, depth-of-field and bokeh simulator for photographers. This page explains what it calculates and where the simulation stops.

What it does

Inputs

Each camera has a sensor, a focal length and an f-number. Sensors run from Micro Four Thirds (17.3 × 13 mm) through APS-C (23.6 × 15.7 mm), full frame (36 × 24 mm) and digital medium format (43.8 × 32.9 mm) to 8×10 large format. Focal lengths run from 10 to 800 mm, apertures from f/0.95 to f/32.

Same subject size

A comparison keeps the person the same size in the frame. The simulator works out the angle of view from focal length and sensor width and places the camera where the subject fills the same share of the picture. A longer lens therefore stands farther back. That change of position, not the focal length itself, changes perspective and makes the background look larger. Lens compression lists the distances.

How the picture is made

The scene is a textured 3D model of a person about 2 m in front of the arcade wall of Basel Minster, not a photograph with a blur filter. For every pixel the renderer traces rays through a thin lens. They start at random points on a round lens disk that scales with focal length divided by f-number, meet on the plane of focus and continue into the scene. Up to 200 samples per pixel are averaged until the image settles, so the blur grows with distance from the plane of focus, around the edges of the person too.

Depth of field numbers

The side view and the line beneath it use the standard thin-lens formulas. The circle of confusion c is one pixel of an 800-pixel-wide image: the sensor width divided by 800, about 0.045 mm on full frame and 0.030 mm on APS-C. The hyperfocal distance is H = f² / (N c) + f. For a focus distance d, the near limit is H d / (H + d − f) and the far limit is H d / (H − d + f), or infinity once d reaches H.

Amount of blur, not bokeh character

The simulator shows how much the background is blurred. It does not reproduce the bokeh character of a particular lens: the shape of the aperture blades, cat's-eye highlights towards the corners, onion rings, soap-bubble edges, swirl, focus breathing or spherical aberration. Two 85mm f/1.4 lenses can blur a background by the same amount and still look different. Bokeh covers this in more detail.

Limits

Who makes it

Lens Simulator is made by Peter Wey in Switzerland. Corrections and questions: hi@lenssimulator.photo