Depth of Field

Under many circumstances, it is desirable to render objects in the image such that they are in sharp focus on the image plane. This is achieved by using the default ``pinhole' camera. In this mode, the camera's aperture is a single point, and all light rays are focused on the image plane.

Alternatively, one may widen the aperture in order to simulate depth of field. In this case, rays are cast from various places on the aperture disk towards a point whose distance from the camera is equal to the focus distance. Objects that lay in the focal plane will be in sharp focus. The farther an object is from the image plane, the more out-of-focus it will appear to be. A wider aperture will lead to a greater blurring of objects that do not lay in the focal plane. When using a non-zero aperture radius, it is best to use jittered sampling in order to reduce aliasing.


\begin{defkey}{aperture}{{\em radius}}
Use an aperture with the given {\em radius}.
\end{defkey}
The default radius is zero, resulting in a pinhole camera model.


\begin{defkey}{focaldist}{{\em distance}}
Set the focal plane to be {\em distance} units from the camera.
\end{defkey}
By default, the focal distance is equal to the distance from the camera to the look point.