Ray Tracing

Unlike aberration theory, which provides an approximate evaluation of an optical system that is valid for all aperture and field points, ray tracing gives exact results, but only for the particular rays traced. To the extent that the traced rays are representative of the behavior of other untraced rays, ray tracing can provide an excellent characterization of system performance with comparatively little computational effort. Because of this, in practical optical design, ray tracing is used more than aberration theory.

The basic concept used in ray tracing is that light energy flows along rays, so that by determining the trajectory of a ray through an optical system, you can find the paths along which energy flows through the system. In detail, this concept sometimes leads to problems, because rays have zero width, and energy must strictly be considered to flow along tubes of rays, but the simpler ideas are applicable to most systems.

It is important to understand that ray tracing is also used as the basis of the computation of the propagation of wavefronts through optical systems. To compute the propagation of a wavefront through a system, OSLO traces several rays from a single object point through different aperture points, and sets up points that are at equal optical path lengths along each ray. The surface that passes through these points (and is normal to the ray at each point) is the wavefront. Once a wavefront has been established in image space, diffraction computations can be carried out to evaluate images that show the effects of physical optics.

OSLO provides several commands for tracing exact skew rays through a system and displaying the resulting data. Most ray tracing in OSLO is based on the concept of first setting up an object point, and then tracing all rays from that point until a new point is established. In order to specify a reference ray to be traced through a system, you must give the coordinates of the object point, the coordinates of the ray passing through some reference surface, and the color of the light in which the ray is to be traced. In OSLO, the object point is defined using the Setup Object Point (sop) command on the Calculate menu, and the color is defined by the current wavelength, which can be set using the Setup Wavelength command on the Calculate menu. OSLO PRO and OSLO SIX also allow you to select object points from the ones defined in the field points set.

When an object point is selected, a reference ray is traced from the object point through a specified point on a surface that has been designated as the reference surface (RFS). The data accumulated by tracing this reference ray is saved for later use. Normally, the reference surface is chosen to be the aperture stop, and the reference ray is the chief ray through the center of this surface, but to provide generality, OSLO allows any surface to be selected as the reference surface, and allows the reference ray to pass through any chosen point on the surface.

If the reference surface is an internal surface, then tracing a reference ray is an iterative procedure that forces the reference ray to go through the given coordinates (usually the center) of the reference surface. In this connection, it should be noted that for the purpose of real ray tracing, rays are actually aimed at a sphere centered on the object point that passes through the intersection of the reference ray with surface 1. This is called the entrance sphere.

The figures below illustrate the definition of the reference ray. The figure on the left shows that for a normal system, the reference ray goes through the center of the aperture stop, and that its extension in object space goes through the center of the paraxial entrance pupil. The figure on the right shows a system that has large pupil distortion. The ray goes through the center of the aperture stop, as before, but its extension in object space does not go through the center of the entrance pupil. For such a system, the apparent pupil location changes with field angle. Because the reference ray trace is iterative, the ray-aiming calculations accommodate this pupil shift automatically.

The set_object_point command requires the user to specify the object point in fractional coordinates FBY, FBX, and FBZ relative to the object height OBH. If the reference ray is to be traced through non-zero coordinates on the reference surface, these coordinates must also be given.

The object point should always be taken on the y-axis in a system that has rotational symmetry. The yz plane is assumed to be the meridional plane by the program. Out-of-plane object points should only be used when it is necessary to analyze systems without symmetry. One consequence of defining an out-of-plane object point is that twice as many rays need to be traced to form a spot diagram (the program handles this automatically).

  1. Open the demotrip.len file. Click Calculate >> Setup Object Point. In the dialog box, set FBY to 1.0 to define an object point at the edge of the field. Close the box by clicking OK. The text window will contain the following output.

*SET OBJECT POINT
         FBY         FBX         FBZ
       1.000000      --          --    
        FYRF        FXRF         FY          FX
         --          --          --          --    
         YC          XC          YFS         XFS         OPL    REF SPH RAD
      18.264293      --       -0.911383   -0.096417   65.421390   58.759999

The data reported by the set_object_point command include the coordinates of the ray on both the reference surface (FYRF, FXRF) and the entrance sphere (FY,FX). When paraxial ray aiming is used, these points are conjugates, and the values will normally both be zero (when aplanatic ray aiming is used with large numerical apertures, the values will no longer be zero). Other data reported by the set_object_point command are the height of the ray on the image plane (YC, XC), the y and x field sags (YFS, XFS), and the optical path length OPL along the ray from the entrance sphere up to the image surface. The reference sphere radius is normally equal to the distance along the reference ray from the exit pupil to the image.

For focal systems, the field sags are distances parallel to the z-axis from the image surface to the point where differential rays in the yz and xz planes intersect the chief ray. For afocal systems, the field sags are reported in diopters.

 

Once a field point has been specified, ordinary rays (i.e. rays aimed at the entrance pupil) can be traced as needed for system evaluation. The particular rays traced are specified by the current fractional object point, the current wavelength, and fractional coordinates FY and FX on the entrance sphere, as shown below. The FY and FX coordinates are proportional to the direction cosines of the ray in object space, not the direction tangents.

The trace_ray command is used to trace a single ray through a system and display data for either all or a subrange of surfaces. The standard output from the trace_ray command gives the xyz coordinates of the ray on each surface, the ray angles YANG and XANG (in degrees), and the distance D along the ray from the previous surface to the current surface. The full output shows, in addition, the direction cosines, the angles of incidence and refraction IANG and RANG (in degrees), and the optical path length from the entrance sphere up to the current surface.

The following shows the full output for a ray on surface 6 from the edge of the field traced through the center of the entrance sphere (for demotrip.len).

*TRACE RAY - LOCAL COORDINATES
 SRF        Y/L         X/K         Z/M      YANG/IANG   XANG/RANG      D/OPL
  6       3.635542      --       -0.386655   18.652661      --        1.642427
          0.319830      --        0.947475    4.012763    6.511011   19.682282
 PUPIL      FY          FX
            --          --
The Calculate >> Ray Analysis menu provides commands that trace fans of rays from the current object point through the system, and report the displacements on the image surface between the rays in the fan and the reference ray. For each ray in the fan, the standard data shown are the fractional entrance pupil coordinates FY or FX, the slope displacements DYA and DXA, and the transverse displacements DY, DX, and DZ. The dialog box for the Calculate >> Ray Analysis command is as follows.

OSLO output for demotrip.len, at the edge of the field, is as follows. The 1.0000e+20 values are shown in trace fan output to indicate ray failure. In the present case, the rays were blocked by checked apertures.

*TRACE FAN 
RAY      FY          DYA         DXA         DY          DX          DZ
  1    1.000000  1.0000e+20  1.0000e+20  1.0000e+20  1.0000e+20  1.0000e+20
  2    0.800000  1.0000e+20  1.0000e+20  1.0000e+20  1.0000e+20  1.0000e+20
  3    0.600000   -0.070355      --       -0.014543      --          --    
  4    0.400000   -0.047501      --       -0.025813      --          --    
  5    0.200000   -0.023999      --       -0.018348      --          --    
  6      --     -2.2204e-16      --     -7.1054e-15      --          --    
  7   -0.200000    0.024401      --        0.024483      --          --    
  8   -0.400000    0.049120      --        0.051365      --          --    
-0.600000  1.0000e+20  1.0000e+20  1.0000e+20  1.0000e+20  1.0000e+20
-1.000000  1.0000e+20  1.0000e+20  1.0000e+20  1.0000e+20  1.0000e+20

If optical path difference output is selected, the trace_fan command shows (instead of the ray displacements DY, DX, and DZ) the OPD and the DMD of the fan ray relative to the reference ray. The definition of OPD is discussed below. DMD stands for "D-d", and refers to the Conrady method for correcting chromatic aberration. It is numerically equal to the difference in distance along the fan ray and the reference ray, between the previous surface and the current surface, times the dispersion of the refractive index in the intervening space.

The optical path difference compares the time of flight of light along a ray to that along the reference ray, and serves as the basis for a variety of diffraction computations. In the figure below, let a reference point on the image surface be given by I, the point where the reference ray intersects the image. Consider a reference sphere centered on the point I, with a radius equal to EI = RI = r, the distance along the reference ray between its intersection with the exit pupil E, and the image point I, as shown. If an aberrated ordinary ray travels from the object to point P in the same time that the reference ray travels from the object to E (so that P lies on the actual wavefront from the object point), the optical path difference is defined to be the distance PR (times the refractive index) between the actual wavefront and the reference sphere, measured along the ray, as shown. A general operating condition (opdw) controls whether OPD is displayed in wavelengths (on) or current units (off).

According to Huygens' principle, to compute the disturbance at the point I resulting from the actual wavefront EP, we should consider each point on the wavefront to be the source of secondary wavelets that are added together with appropriate relative phases. Since the distance RI = EI, the relative phase of light arriving at I depends on the distance PR (i.e. the OPD) between the actual wavefront and the reference sphere.

T'he figure shows that if the ray displacement DY is not zero, the OPD depends on the radius r of the reference sphere. This is a consequence of the fact that an aspheric wavefront changes its shape as it propagates. In the figure, the arc IT has a radius r and center at R. It follows that the OPD is equal to the optical path length along the ray to Q, plus the distance QT, minus the optical path length along the reference ray to I. As the radius of the reference sphere is changed, the OPD changes according to the distance ST between the arc and a perpendicular from I to the ray, as shown. As the radius of the reference sphere approaches infinity, ST approaches zero. Strictly speaking, the OPD should be measured along a line from P towards I, not towards R. However, the difference is negligible.

For an afocal system, the OPD is computed using a different method. The last surface is assumed to be coincident with the exit pupil, and the OPD is defined to be the optical path length along the ray to the point where it intersects a plane perpendicular to the reference ray, minus the optical path length along the reference ray to that plane, as shown below.

 

Next Page | Previous Page | Chapter Summary | Table of Contents


Copyright © 1997 Sinclair Optics Inc. All rights reserved.
Page last updated 19970601