A ray models propagation of an electric field, and therefore has both magnitude and phase. The ray amplitude is a complex number of the form

Ae-if

The intensity of a ray is given by the square of the ray amplitude, or A*A. The intensity of the ray can be measured in units of power, energy, power per unit time, or energy per unit time. What units are appropriate to use for rays depends on the details of the specific computation being performed. Note the term intensity used here is not the same as is commonly used in radiometry, where intensity is power per solid angle.

The ray amplitude is generally reduced whenever the ray crosses an index boundary, such as refracting from air into glass. The presence of thin films on the glass alters the amount of amplitude loss. Amplitude is also reduced due to bulk absorption traveling through glass. All of these effects are modeled as part of the polarization ray trace feature in ZEMAX discussed in a separate article.

As a ray propagates, the phase of the ray changes. The phase change due to propagation of a distance t is given by

f = 2ptn / l

where n is the index of refraction in the media, l is the wavelength, and f is measured in radians.

For homogeneous, isotropic media the optical path length of a ray is the product of the distance traveled by the ray multipled by the refractive index through which the ray travels:

OPL = nt

where n is the index of refraction and t is the distance traveled. The OPL may be computed for a complete optical system, from source point to image surface, by summing the OPL for each media between each optical surface.

For best image quality, every ray should intercept the image at the same point, and with the same phase. For this reason, it is more convenient to keep track of the optical path length of a ray as the difference between the ray and some reference ray, usually the chief ray. It is also convenient, for reasons described in reference 1, to measure the OPL not from the source to the image, but from the source to the reference sphere. The reference sphere is a spherical surface centered on the point where the chief ray intersects the image surface. The radius of the reference sphere is defined by the distance from the image surface to the paraxial exit pupil. This quantity is called optical path difference (OPD):

OPD = OPLray - OPLchief

Where both OPL values are measured from the source to the reference sphere. The OPD is what is displayed on the OPD fan:

The OPD can be used to reconstruct the wavefront from the ray data. ZEMAX uses OPD as the primary means of computing and displaying wavefront aberrations.