- Home
- Non Sequential Ray Tracing
- Sources, Splitting and Scattering
- How to Model Colored and Tristimulus Sources
How to Model Colored and Tristimulus Sources
- By Sanjay Gangadhara
- Published 21 April 2009
- Sources, Splitting and Scattering
- Unrated
Source modeling using Tristimulus data
An overview of Tristimulus source modeling is provided in the following Wikipedia article: http://en.wikipedia.org/wiki/CIE_1931. As described in that article, the Tristimulus XYZ values characterize the color of a source as seen by the human eye:

The quantities x-bar(l), y-bar(l), and z-bar(l) represent the human eye response, while I(l) represents the spectral distribution of the source.
Since the Tristimulus values represent the integral of the spectral distribution over the human eye response, many different distributions can generate the same XYZ values. In other words, different spectra can generate the same color. Thus, in addition to specifying XYZ values for the source, in ZEMAX we must also specify the wavelengths associated with the source distribution. This is done in the same manner as it was done for the Uniform Power and Black Body source models, as described in the previous section.
To choose the Tristimulus XYZ model for a particular source object, select the “CIE 1931 Tristimulus XYZ” option under the Source Color setting in the Sources Tab of the Object Properties dialog box:
Once this model has been selected, options to define the XYZ and the wavelength values for the source are shown. In the above example, the wavelengths used to model the source are 0.44, 0.54, and 0.64 microns (i.e. from 0.44 to 0.64 microns in 3 steps), and the Tristimulus values for the source are X = 1, Y = 0.5, and Z = 0.25.
Once the XYZ and the wavelength values are defined, ZEMAX performs a fitting to determine the relative intensity of light at each wavelength. The intensity values are chosen to generate the desired XYZ values, and in such a way as to keep the RMS of the intensity values at a minimum while ensuring that none of the wavelength weights are negative. The fit results are shown below the input data, along with a color bar showing the closest RGB representation for this fit.
In the above example, an exact match to the input XYZ values has been generated. When an exact match is not found, it is generally because the wavelength spectrum does not include enough wavelengths and/or the correct wavelengths to model the color of interest, or because the input XYZ values do not represent a color that can actually be seen by the human eye. More details are provided in the above Wikipedia article (e.g. see the chromaticity diagram), as well as in the section entitled “The spectrum fitting algorithm” located in the chapter of the ZEMAX manual entitled “Non-Sequential Components”.
Values for the intensity distribution may be observed in the Prescription Data Report:

In this report, we see the three wavelengths used to model the source listed in the first column, and the x-bar, y-bar, and z-bar values (i.e. the human eye response) for each wavelength listed in columns 3-5. The relative intensity (weight) for each wavelength is listed in column 2. The weights are normalized so that the total sum is unity, and the weights are always provided in terms of Watts. For example, if a source with the above chromatic characteristics launched 1 W of power, ~ 0.061 W of light would be radiated at 0.44 microns, ~ 0.064 W of light would be radiated at 0.54 microns, and ~ 0.875 W of light would be radiated at 0.64 microns.
The last column in the report shows how many Lumens would be seen at each wavelength for the given weightings. The number of Lumens is simply the product of the weight and the y-bar value (as described in the Wikipedia article), multiplied by 683. This final scale factor corresponds to the number of Lumens for 1 Watt of light at 0.555 microns, for which the y-bar value is 1.0. Thus, for the wavelengths shown above:
0.44 microns: 0.061*0.023*683 = 0.9585 Lumens/Watt
0.54 microns: 0.064*0.954*683 = 41.921 Lumens/Watt
0.64 microns: 0.875*0.175*683 = 104.54 Lumens/Watt
If this source launched 1 W of power, the human eye would see ~ 147.4 Lumens (= sum over all wavelengths). It is interesting to note that although the relative intensity in Watts for light at 0.54 microns is small for this source, the number of Lumens contributed at this wavelength is significant, because of the large y-bar value. In other words, the human eye is very responsive to the green portion of the wavelength spectrum.
As indicated above, the relative intensity listed in the Prescription Data Report is always in Watts, as rays are always traced in terms of Watts. If the source is defined in terms of Lumens (which can be done by changing the Source Units to Lumens under the Units tab of the General dialog box), ZEMAX will first convert the source to the equivalent number of Watts, using the Lumens/Watts conversion shown above. Once the source power in Watts is determined, the distribution at each wavelength is known from the relative weights. Once a ray of a particular wavelength hits a detector, its intensity may be converted back to Lumens, if the Detector Color object is used (see the article entitled “How to Measure and Optimize Color Data”).
ZEMAX supports other source definitions which are equivalent to the Tristimulus XYZ definition. These are:
• Chromaticity xy (defined in the same Wikipedia article as XYZ)
• RGB (defined by the following Wikipedia article: http://en.wikipedia.org/wiki/Srgb)
• D65 White (XYZ values corresponding to the white color on computer monitors: http://en.wikipedia.org/wiki/D65)
• Color Temperature (XYZ values that generate the same color as a blackbody at a particular temperature)
• Chromaticity u’v’ (defined by the following Wikipedia article: http://en.wikipedia.org/wiki/CIELUV_color_space)
In all of the above cases, ZEMAX converts the input data into Tristimulus XYZ values. The same fitting algorithms are then used to determine the intensity distribution for the source over the inputted wavelength range.
As described in the previous section, there are also sources in ZEMAX which require no fitting:
• System Wavelengths (relative intensities and wavelengths defined in Wavelength Data dialog box)
• Uniform power (relative intensities are equal over all wavelengths)
• Black Body (relative intensities determined from true blackbody curve)
• User Defined (relative intensities and wavelengths given in a text file)
These sources may or may not generate an output that can be seen by the human eye, as a result. Nonetheless, in all of these cases – except for System Wavelengths – the relative weightings and associated x-bar, y-bar, and z-bar values will be shown in the Prescription Data Report.
When System Wavelengths is chosen, then the wavelengths defined in the Wavelength Data dialog box are used for the source (default). In this case, the relative intensities are not provided in the Prescription Data Report, but they are of course listed in the Wavelength Data dialog box. If the source units are in Lumens, then the weights provided in the Wavelength Data dialog box are also in Lumens; this is the only time in which wavelength weights are not given in Watts.