Chapter 10

Depth of Field

image

Image courtesy of Tania Humphreys

Objectives

By the end of this chapter, you should:

  • understand how depth of field is simulated in ray tracing;
  • have implemented a thin-lens camera.

The depth of field of a camera is the range of distances over which objects appear to be in focus on the film. A photographer can set the depth of field of a real camera by adjusting the camera lens. In contrast, everything is in focus with the pinhole camera we modeled in Chapter 9 because the “lens” is infinitely small. Real cameras have finite-aperture lenses that only focus perfectly at a single distance called the focal distance. I’ll ...

Get Ray Tracing from the Ground Up now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.