This article is also available in Japanese.
The normalized field and pupil coordinates (Hx, Hy, Px and Py respectively) of a ray are often used to indicate to ZEMAX exactly which ray is desired for analysis. For example, the Ray Trace Calculation (via Analysis > Calculations > Ray Trace) requires the specification of Hx, Hy, Px, and Py, as do many of the Merit Function operands.

Although the ray trace calculation and merit function operands can return very useful information about a given ray, it is also helpful to have a qualitative feel for how a specific ray traverses through your optical system. This very concept may be applied to the various layout plots in ZEMAX via the RAYLIST.
The layouts in ZEMAX (excluding the 2D Layout) support a number of different Ray Patterns, including XY Fan, X Fan, Y Fan, Ring, Random, Grid, and List. By choosing List as the “Ray Pattern,” the rays within the layout are traced according to a simple text file.

This text file is entitled, “RAYLIST.TXT,” and is located in the main ZEMAX directory. Note that the filename and directory MUST remain the same. Any changes made to the filename or the directory in which it is saved will not be recognized by ZEMAX.
The RAYLIST.TXT file is simply of ASCII format, and supports two distinct methods for defining rays, each of which is discussed in more detail in the following pages of this article:
| FORMAT | SUMMARY | PAGE # |
| IMPLICIT | Rays are defined by the normalized pupil coordinates | 2 |
| EXPLICIT | Rays are defined by their starting coordinates, direction cosines, and wavelength. | 3 |
IMPLICIT: The implicit format for the RAYLIST.TXT file consists of two numbers on each line: one for the Px and one for the Py normalized pupil coordinates. The syntax is as follows:
Px Py
For example, in a rotationally symmetric system, the two meridional marginal rays are defined in the RAYLIST.TXT file by:

These specified rays are traced at each defined field and wavelength in the settings of the respective layout plot.
Take the “Double Gauss 28 degree field.ZMX” sample file (ZEMAX/Samples/Sequential/Objectives directory) as an example. The Double Gauss design includes three fields (0, 10, and 14 degrees) and three wavelengths (F, d, and C wavelengths representing the visible spectrum).
If we choose to display the two defined meridional rays at the primary wavelength (wavelength 2) and from All fields, a total of 6 rays will be drawn. That is, 2 marginal rays * 1 wavelength * 3 fields. Remember to select List as the “Ray Pattern!” 

EXPLICIT: The explicit format consists of the word EXPLICIT on the very first line of the RAYLIST.TXT file, followed by the values x, y, z, l, m, n, and wavenumber; where x, y, and z are the ray starting coordinates, l, m, n are the direction cosines of the ray, and wavenumber is the integer indicating the wavelength to use.
All coordinates are in object space. If the system is at infinite conjugates, then the spatial coordinates are relative to Surface 1. If the object in not at infinity, then the coordinates are with respect to Surface 0 (the OBJ surface).
The syntax of the explicit format is as follows:
EXPLICIT
x y z l m n wavenumber
Using the “Double Gauss 28 degree field.ZMX” once again as an example, edit the RAYLIST.TXT file to trace the rays defined by the following starting coordinates, direction cosines, and wavelength:

When an EXPLICIT trace is defined, the field and wavelength settings are ignored, and only those rays listed in the file are traced. In the current example, the three above listed rays are traced as follows:

The RAYLIST is a feature within ZEMAX which provides and easy way to visualize the propagation of any number of rays via the layout plots in ZEMAX (excluding the 2D Layout). Rays may be defined one of two ways in the RAYLIST.TXT file:
References
ZEMAX Optical Design Program User's Guide, ZEMAX Development Corporation