8. The Anatomy of Ray
Chapter 8 serves as a reference about the various parameters of LensLab's Ray object. Ray objects hold the results of the ray-tracing operation. Each Ray object contains rules holding information about a particular surface intersection point. There are five categories of parameters stored in Ray: physical parameters, component parameters, pointer parameters, graphical parameters, and flag parameters. Here is a complete listing of the Ray parameters.
Parameters of the Ray object.
In addition to the built-in ray parameters, you can add your own ray parameters to work with your new ray-tracing functions. For the remainder of this chapter, we will separately consider each of the five categories of built-in ray parameters.
8.1 Physical Parameters
Physical parameters describe the physical characteristics about the particular ray/surface intersection point. These parameters give important optical information about the ray trace. Not all parameters are used in every ray trace. Some parameters, such as DiffractionMismatch, are only included for specific ray-tracing functions. Here is a table of names for the physical parameters.
BirthPoint OpticalMedium RefractiveIndex
DiffractionMismatch Polarization RotationMatrix
DiffractionOrderNumber RayEnd SurfaceCoordinates
Intensity RayLength Temperature
IntrinsicMedium RayStart WaveLength
Names of physical parameters stored in the Ray object.
Next, we define the physical parameters.
Definitions of physical parameters stored in the Ray object, part one.
Definitions of physical parameters stored in the Ray object, part two.
8.2 Component Parameters
Component parameters stored in Ray give information about the particular component surface being encountered by the ray. This information often describes physical characteristics about the surface, but may not directly relate to important optical characteristics. This information is used by LensLab for ray-tracing and rendering operations. The UnconfinedPath parameter is more fully discussed in Sections 2.1 and 10.5. Next, we define the Component parameters.
Definitions of Component parameters stored in the Ray object.
8.3 Pointer Parameters
As part of the stored information, each Ray holds pointers that mark its position in the ray-tracing result. When a Ray fails to intersect with a surface, some pointers that target a new surface get incremented. Here is a table of the ray pointers.
ComponentIncrement ConfinedNumber SurfaceIncrement
ComponentNumber GenerationNumber SurfaceNumber
ConfinedPosition IntersectionNumber UnconfinedPosition
Names of pointer parameters stored in the Ray object.
You can use these pointers during the postray-tracing analysis for selecting particular intersection points for closer study. Although these pointers have important roles during the ray tracing, some of these pointers are more useful than others in the postselection process. Of the nine pointers, you will find ComponentNumber, SurfaceNumber, and IntersectionNumber to be the most useful. You may also find ConfinedPosition to be useful for Ray selection. The remaining pointers are rarely used in postray-tracing analysis, but are discussed below for completeness.
ComponentNumber and SurfaceNumber
ComponentNumber and SurfaceNumber are among the most useful for Ray selection in postray-tracing analysis.
ComponentNumber points to the Component being targeted by Ray, while SurfaceNumber points to the particular surface within Component being targeted by Ray. By using ComponentNumber as a selection property, you can selectively extract Ray objects from a particular component encounter. By using SurfaceNumber in combination with ComponentNumber, you can selectively examine Ray objects from a particular surface encounter within a particular component. It is important to realize that SurfaceNumber identifies a distinct surface instead of recording the surface level reached by Ray in Component. Otherwise you may prefer to use ConfinedPosition.
IntersectionNumber and GenerationNumber
Each Ray also contains pointers that indicate the generation in which Ray was created, which is referenced to the start of the ray trace. The pointers are defined below.
Of these two pointers, IntersectionNumber is the most useful as a ray selection property since it tells how many surfaces have been encountered by a specific ray leading to the creation of the particular Ray.
GenerationNumber works on a more global scale by indicating the maximum IntersectionNumber value found for all Ray objects present at the time of the particular Ray object's creation. In general, the GenerationNumber value of a particular Ray object will always be greater than or equal to the IntersectionNumber value given. Although their values are sometimes the same, IntersectionNumber is more reliable than GenerationNumber as a Ray selection criterion.
ConfinedPosition and ConfinedNumber
Two pointers indicate the present Ray position within the confined migration path. These are ConfinedPosition and ConfinedNumber. You will sometimes find ConfinedPosition to be a useful parameter in Ray selection.
ConfinedPosition indicates a particular slot position along a confined pathway, while ConfinedNumber indicates the particular confined path traversed by Ray.
SurfaceIncrement and ComponentIncrement
Although SurfaceIncrement and ComponentIncrement are very important pointers used during ray tracing, these parameters are almost never used in postray-tracing analysis.
As rays propagate through the optical system, each time a ray intersects with a new surface, a new Ray object is created that gets a modified copy of the previous Ray object's parameter contents and whose ConfinedPosition parameter value gets incremented by the parameter SurfaceIncrement. When a Ray object targets a new Component, ComponentNumber gets incremented by ComponentIncrement.
UnconfinedPosition is a Ray pointer rarely used as a selection property for postanalysis.
8.4 Graphical Parameters
The graphical parameters of Ray are used for ray rendering. The RayLabel parameter is used for selection of rays and is discussed in Section 6.1. Here is a table of names for the graphical parameters.
Names of graphical parameters stored in the Ray object.
Here are definitions of the physical parameters.
Definitions of graphical parameters stored in the Ray object.
8.5 Flag Parameters
Flag parameters are used internally by LensLab during the actual ray tracing. These parameters are used with ray-tracing functions and are seldom useful for postray-tracing analysis. Here are definitions of the flag parameters.
Definitions of flag parameters used in the ray-tracing process.
LensLab is a trademark of Optica Software.
Mathematica ® is a registered trademark of Wolfram Research, Inc. All other product names mentioned are trademarks of their producers. Mathematica is not associated with Mathematica Policy Research, Inc. or MathTech, Inc.
Copyright ©1995-2005 by Optica Software, Urbana, Illinois, Champaign, Illinois.
All rights reserved. No part of this document may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of the author, Optica Software.
Optica Software is the holder of the copyright to the LensLab package software and documentation ("Product") described in this document, including without limitation such aspects of the Product as its code, structure, sequence, organization, "look and feel", programming language and compilation of command names. Use of the Product, unless pursuant to the terms of a license granted by Optica Software. or as otherwise authorized by law, is an infringement of the copyright.
Optica Software makes no representations, express or implied, with respect to this Product, including without limitations, any implied warranties of merchantability or fitness for a particular purpose, all of which are expressly disclaimed. Users should be aware that included in the terms and conditions under which Optica Software is willing to license the Product is a provision that the author, Optica Software and distribution licensees, distributors and dealers shall in no event be liable for any indirect, incidental or consequential damages, and that liability for direct damages shall be limited to the amount of the purchase price paid for the Product.
In addition to the foregoing, users should recognize that all complex software systems and their documentation contain errors and omissions. Optica Software shall not be responsible under any circumstances for providing information on or corrections to errors and omissions discovered at any time in this document or the package software it describes, whether or not they are aware of the errors or omissions. Optica Software does not recommend the use of the software described in this document for applications in which errors or omissions could threaten life, injury or significant loss.
Created by Mathematica (November 3, 2005)