Lens Simulator is a free web app for depth of field, bokeh and optical ray tracing.
What it does
- Side-by-side 3D portraits: keep the subject the same size, or walk closer and farther yourself
- Ray-tracing of lens profiles based on patent information from Nikon, Canon, Sony, Leica and Fujifilm: glass, bokeh, vignetting and focus breathing
- Live Optical X-Ray of the cross-section, the aperture stop, the ray path and the focusing groups
- Depth of field and perspective: camera distance, near and far limits, hyperfocal distance and background compression from f/0.95 to f/32
- 1-inch, Micro Four Thirds, APS-C, full frame, medium format and 4×5 / 8×10 large format
Inputs
Each camera has a sensor, a focal length and an f-number. Sensors run from 1-inch (13.2 × 8.8 mm) and 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. On smaller and larger sensors the panel also shows the full-frame equivalent focal length and f-number. Focal lengths run from 8 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 picture is ray-traced through a 3D scene, not a photograph with a blur filter. Each camera is either an ideal lens or a simulated lens profile. The ideal lens is a thin lens: a round disk whose diameter is the focal length divided by the f-number. A lens profile is built from published optical patents of Nikon, Canon, Sony, Leica and Fujifilm, and the rays are traced through that glass, the aperture stop and the focusing groups. Many rays are accumulated over time: the longer you wait, the better the simulated picture.
These profiles are calculations from public patent information. There may be errors. Nothing here guarantees that the arithmetic is right, or that the patent is the lens that was manufactured.
Depth of field numbers
The side view and the line beneath it are the standard thin-lens estimate of the sharp zone. 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. The picture of a patent lens is the ray trace, so the drawing inside that zone can differ from the ideal lens at the same settings. Depth of field uses the print standard, 0.030 mm on full frame. The same settings draw a wider green band in this view, about 1.5 times, because one pixel of the 800-pixel frame is 0.045 mm.
What a particular lens adds
Ideal lens shows how much the background blurs from focal length, aperture and sensor size. Real lens traces one published prescription, so the picture also carries that lens: the aperture blades, cat's-eye highlights toward the corners, vignetting, the glow of spherical aberration wide open, and focus breathing as you step closer. Two 85mm f/1.4 lenses can blur a background by a similar amount and still look different. Bokeh compares those traced discs: cat's eye, aperture blades and spherical aberration.
Accuracy, and what a zoom changes
The ideal lens is thin-lens geometry. A real-lens picture traces one published patent. It is a calculation, not a measurement of a lens you can buy. A misread prescription, or a difference between the patent and the lens that was sold, shows up in the picture. Coatings, sample variation and the molded texture of an asphere are not in it.
Zooming without moving your feet does not change perspective. The person and the background grow by the same amount: a tighter crop of the same view. What people call telephoto compression changes only when the camera moves. Lens compression compares the two.
The source is the patent number on each lens page. That page is the calculation, not a measurement of a lens you can buy.
Limits
- How far the background sits behind the person changes how much two lenses differ. The scenes are a few fixed 3D setups.
- The focal length and f-number on the sliders are nominal. A patent profile follows that patent, which can differ from the lens that was sold, most of all at close focus.
- Not in the picture: manufacturing tolerances, coatings, the molded texture of aspherical surfaces, or sensor noise. Distortion, vignetting and colour fringing of the traced prescription are.
- A lens in the list is the patent traced under that name. It is not a sharpness ranking.