0% found this document useful (0 votes)
270 views

Lambda TracePro 2022 User Manual

Lambda TracePro 2022 User Manual

Uploaded by

wagarigon
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
270 views

Lambda TracePro 2022 User Manual

Lambda TracePro 2022 User Manual

Uploaded by

wagarigon
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 585

Software for Opto-Mechanical Modeling

User’s Manual
Release 2022
Revised 7-July-2022

Lambda Research Corporation


25 Porter Road
Littleton, MA 01460

[email protected]
COPYRIGHT AND TRADEMARK ACKNOWLEDGMENTS

COPYRIGHT

The TracePro® software and manual are Copyright © 2022 by Lambda Research Corporation. All
rights reserved.
This software is provided with either a single user license or a network license. A single user
license may only be used by one user and on one computer at a time. A network license may be
used by one or more users, up to the number purchased for the network license, on any computer
connected to the license server via the network.
The TracePro manual contains proprietary information. This information as well as the rest of the
manual may not be copied in whole or in part, or reproduced by any means, or transmitted in any
form without the prior written consent of Lambda Research Corporation.

TRADEMARKS
TraceProand OSLO are registered trademarks of Lambda Research Corporation.
RayViz, TracePro Bridge, and RepTile are trademarks of Lambda Research Corporation.
The following are trademarks or registered trademarks of Kubotek Corporation in the USA and/or
other countries: KUBOTEK® KUBOTEK3D™ KEYCREATOR® KUBOTEK KOSMOS KCM
ACIS is a registered trademark of Spatial Corporation.
Autodesk and Autodesk Inventor are registered trademarks of Autodesk, Inc.
Code V is a registered trademark of Synopsys, Inc.
PRO-E and Pro/ENGINEER are registered trademarks of Parametric Technology Corporation.
Wildfire is a trademark of Parametric Technology Corporation.
SolidWorks is a registered trademark of SolidWorks Corporation.
Windows is a registered trademark of Microsoft Corporation in the United States and other coun-
tries.
ProSource is a registered trademark of Radiant Zemax
Zemax is a registered trademark of Zemax.

CodeMeter® is a registered trademark of WIBU-SYSTEMS AG.


LICENSE AGREEMENT

The purchaser of TracePro is granted a license to use this product subject to the following restric-
tions and limitations.

1. The license is to the original purchaser only, and is not transferable without written permission
of Lambda Research Corporation.

2. With a single-user license, only one copy of the software may be used on a single computer at
a time. The software may be transferred for use on another computer, but the software may
not be used simultaneously on more than one computer unless additional licenses are pur-
chased for each multiple simultaneous use.

3. A network license may be used by one or more users, up to the number purchased for the net-
work license, on any computer connected to the license server via the network. The license
may be transferred to a different server computer by moving the license key and installing the
license server software on the new server computer.

4. The original purchaser may make backup copies of the original software for his own use only,
subject to the use limitations of this license agreement.

5. The original purchaser may not engage in, or permit third parties to engage in, any of the fol-
lowing:

a. Providing the use of the software in a computer service business, network, or time-sharing
use to users who are not individually licensed by Lambda Research Corporation.

b. Making alterations or copies of any kind in the software except as specifically permitted
above.

c. Attempting to disassemble, decompile, or reverse engineer the software in any way.

d. Attempting to defeat the hardware key or license manager software.

6. You may not use or otherwise export or re-export the licensed product except as authorized by
United States law and the laws of the jurisdiction in which the licensed product was obtained.
In particular, but without limitation, the licensed product may not be exported or re-exported (a)
into any U.S. embargoed countries or (b) to anyone on the U.S. Treasury Department's list of
Specially Designated Nationals or the U.S. Department of Commerce Denied Person’s List or
Entity List. By using the licensed product, you represent and warrant that you are not located
in any such country or on any such list. You also agree that you will not use these products for
any purposes prohibited by United States law, including, without limitation, the development,
design, manufacture or production of missiles, or of nuclear, chemical, or biological weapons.

WARRANTY

Although Lambda Research Corporation has made every effort to ensure that TracePro is techni-
cally accurate, Lambda Research makes no representations or warranties of any kind whatsoever,
directly or indirectly, with respect to the contents hereof or the software described herein. Lambda
Research shall not be liable for errors contained herein or with the software described herein for

TracePro 2022 User’s Manual i


any incidental or consequential damages caused by, or in connection with, the furnishing, perfor-
mance, use of, or any inability to use this product.
With respect to the physical CD-ROM, hardware key, and documentation enclosed herein,
Lambda Research warrants the same to be free of defects in materials and workmanship for a
period of thirty days from the date of purchase. Lambda Research will replace the defective CD-
ROM, key, or documentation within this warranty period upon receipt of the defective product.
Lambda Research reserves the right to make changes to the TracePro software or documentation
without obligation to notify any person of such revision or change.

ii TracePro 2022 User’s Manual


DOCUMENT CONVENTIONS
The following conventions are used throughout the TracePro manual.

Menu items and menu sequences are shown as Define|Edit Property


Data|Material Properties. The sequence will be to select the Define Menu,
then the Edit Property Data Menu and finally the Material Properties Menu.
Functions available to a certain Edition of TracePro are indicated by the following
Edition Icons.

TracePro Expert

  TracePro Standard

  TracePro LC

Text shown in this format is to be typed or viewed in a text


editor.

TracePro 2022 User’s Manual iii


iv TracePro 2022 User’s Manual
CHAPTER 1 Introduction 1
What is TracePro? 1
Why Solid Modeling? 1
How Does TracePro Implement Solid Modeling? 2
Why Monte Carlo Ray Tracing? 2
The TracePro Graphical User Interface 3
Toolbars 3
Model Window 4
Multiple Models in Multiple Views 5
System Tree Window 6
Context Sensitive Menus 9
User Defaults 11
Objects and Surfaces 11
Modeless Dialog Boxes 15
Context Sensitive OnLine Help 17
Command Line Arguments 18
Using a Language other than English 19

CHAPTER 2 Creating a Solid Model 1


Introduction to Solid Modeling 1
Model Units 1
Position and Rotation 1
Defining Primitive Solid Objects 2
Block 3
Cylinder/Cone 3
Torus 4
Sphere 5
Thin Sheet 6
Rubberband Primitives 8
Defining TracePro Solids 9
Lens Element 9
Fresnel Lens 22
Reflector 24
Tube 33
Baffle Vane 33
Boolean Operations 35
Moving, Rotating, and Scaling Objects 37
Sweeping and Revolving Surfaces 42
Notes Editor 44
Importing and Exporting Files 45
CAD Translators 45
Plot formats for model files 46
Lens Design Files 47
Merging Files 49
Inserting Files 49
Update from RayViz 49
Changing the Model View 50
Zooming 51

TracePro 2022 User’s Manual v


Panning 52
Rotating the View 52
Named Views 52
Controlling the Appearance of Objects 53
View Options 56
Changing Colors 64
Photorealistic Rendering 64
Photorealistic Rendering Setup 65
Photorealistic Rendering Options 66

CHAPTER 3 Defining Properties 1


Overview 1
What is a property? 1
Define or Apply Properties 1
Property Editors 1
Toolbars and Menus 3
Command Panel 3
Information Panel 4
Grid Panel 4
Material Properties 5
Material Catalogs 5
Material Property Database 5
Create a new material property 6
Editing an existing material property 7
Exporting a material property 7
Importing a Material Property 8
Bulk Absorption 8
Birefringence 9
Bulk Scatter Properties 9
Bulk Scatter Property Editor 10
Import/Export 11
Scatter DLL 12
Fluorescence Properties 12
Defining Fluorescence Properties 13
Using the Fluorescence Property Generator 14
Fluorescence Calculations 14
Fluorescence Ray Trace 15
Surface Source Properties 17
Surface Source Property Editor 17
Create a New Surface Source Property 18
Edit an Existing Surface Source Property 19
Export a Surface Source Property 19
Import a Surface Source Property 19
Using The Surface Source Property Generator 20
Gradient Index Properties 20
Gradient Index Property Editor 20
Create a New Gradient Index Property 21
Edit an Existing Gradient Index Property 22
Export a Gradient Index Property 22
Import a Gradient Index Property 22

vi TracePro 2022 User’s Manual


Surface Properties 23
Using the Surface Property Database 23
Using the Surface Property Editor 23
Creating a new surface property 29
Editing an Existing Surface Property 29
Exporting a Surface Property 30
Importing a Surface Property 30
Surface Property Plot Tab 30
Table BSDF 33
Using The BSDF Converter 41
Using BSDF Properties 42
Wire Grid Polarizers 43
Thin Film Stacks 43
Using the Stack Editor 44
Thin Film Stack Editing Note 44
BSDF Properties 47
Using the BSDF Property Editor 48
Importing and Exporting BSDF Properties 49
RepTile Surfaces 49
Overview 49
Specifying a RepTile surface 49
RepTile Parameterization 77
Decentering RepTile Geometry 82
Property Database Tools 83
Update Property Database 83
Import 83
Export 84

CHAPTER 4 Applying Properties 1


Using Properties 1
Limitations in Pre-Defined Property Data 1
Applying Property Data 1
Material Properties 4
Material Catalogs 4
Applying Material Properties 4
Applying Birefringent Material Properties 5
Bulk Scattering 6
Fluorescence Properties 7
Applying Fluorescence Properties 8
Gradient Index Properties 9
Surface Properties 10
Using the Surface Property Database 11
Surface Source Properties 12
Blackbody Surface Sources 17
Blackbody and Graybody Calculations 18
Prescription 18
Color 19
Importance Sampling 20
Defining Importance Sampling Targets Manually 21

TracePro 2022 User’s Manual vii


Automatic Setup of Importance Sampling 26
Editing/Deleting Importance Sampling Targets 29
Exit Surface 30
Predefined irradiance map orientation 31
Diffraction 32
Defining Diffraction in TracePro 32
Do I need to Model Diffraction in TracePro? 32
How do I Set Up Diffraction? 33
Using the Raytrace Flag 33
Mueller Matrix 33
Temperature 36
Class and User Data 38
RepTile Surfaces 39
Overview 39
Specifying a RepTile surface 40
Temperature Distribution 53
Applying a temperature distribution 54

CHAPTER 5 Ray Tracing and Optimization 1


Introduction to Ray Tracing 1
Combining Sources 1
Managing Sources with the System Tree 1
Managing Sources with the Source/Wavelength Selector 2
Defining Sources 3
Grid Sources 3
Surface Sources 22
File Sources 22
Image Sources 26
30
Ray File Wavelength Editor 30
31
Source Builder 31
Orienting and Selecting Sources 32
Multi-Selecting Sources 32
Move and Rotate Dialogs 33
Sources Editor 34
Tracing Rays 36
Standard (Forward) Raytrace 36
Reverse Ray Tracing 36
Luminance/Radiance Ray Tracing 38
Raytrace Options 41
Options 42
Thresholds 46
Simulation and Output 47
Simulation Options for TracePro LC 48
Advanced Options 49
Ray Tracing modes 54
Analysis Mode 54
Simulation Mode 55

viii TracePro 2022 User’s Manual


Optimization 58
Interactive Optimizer 58
Texture Optimizer II 58

CHAPTER 6 Analysis 1
Examining Raytrace Results 1
Analysis Menu 1
Display Rays 1
Ray Colors 1
Path Sort Table 3
Irradiance Maps 7
Luminance/Radiance Maps 18
3D Irradiance/Illuminance 21
Candela Plots 26
Polarization Maps 42
OPL/Time-of-flight plot 45
Incident Ray Table 49
55
Ray Files - Binary file format 55
Ray Histories 55
Ray Sorting 58
Reports Menu 63
Flux Report 63
Property Data Report 64
Raytrace Report 64
Saving and Restoring a Raytrace 64
Tools Menu 65
Audit 65
Delete Raydata Memory 65
Collect Volume Flux 66
View Volume Flux 68
Simulation File Manager 71
Irradiance/Illuminance Viewer 72
Candela Plot Viewer 75
Analysis Toolkit 76
Solar Emulator 77
IES/LDT Plots 77
Lighting Toolkit 77
Stray Light Analyzer 77
Measurement Dialog 78

CHAPTER 7 Technical Reference 1


Introduction 1
The Use of Ray Splitting in Monte Carlo Simulation 1
Importance Sampling 2
Importance Sampling and Random Rays 3
When Do I Need Importance Sampling? 4
How to Choose Importance Sampling Targets 4
Importance Sampling Example 5

TracePro 2022 User’s Manual ix


Material Properties 6
Material Property Database 7
Gradient Index Profile Polynomials 9
Complex Index of Refraction 14
Surface Properties 15
Coincident Surfaces 15
BSDF 15
Asymmetric BSDF 19
Calculation of Fresnel coefficients during raytrace 26
Anisotropic Surface Properties 26
User Defined Surface Properties 28
Angles Measured in Substrate 48
Surface Source Properties 51
Spectral types 52
Angular Types 55
Mueller Matrices and Stokes Vectors 57
Bulk Scattering 61
Henyey-Greenstein Phase Function 61
Gegenbauer Phase Function 62
Scattering Coefficient 62
Using Bulk Scattering in TracePro 62
User Defined Bulk Scatter 63
Non-Uniform Temperature Distributions 68
Overview 68
Distribution Types 68
Defining Temperature Distributions 72
Format for Temperature Distribution Storage Files 73
Polynomial Approximations of Temperature Distributions 83
Interpretation of Polar Iso-Candela Plots 90
Property Import/Export Formats 93
Material Property Format 93
Surface Property Format 94
Stack Property Format 98
Gradient Index Property Format 99
Bulk Scatter Property Format 105
Fluorescence Property Format 106
Surface Source Property Format 107
RepTile Property Format 109

CHAPTER 8 Using the Macro Language 1


The Scheme Language 1
Notepad++ 2
Macro Recorder 2
Macro Command Examples 3
Running a Macro Command from the Command Line 4
Running a Scheme Program Stored in a File 4
Creating Geometry 5
Create a solid block: 5
Create a solid block named blk1: 5
Create a solid cylinder: 5

x TracePro 2022 User’s Manual


Create a solid elliptical cylinder: 5
Create a solid cone: 6
Create a solid elliptical cone: 6
Create a solid torus: 6
Boolean Operations 7
Boolean subtract 7
Boolean unite 7
Boolean intersect 7
Macro Programs 7
Accessing TracePro Menu Selections using Scheme 7
For more information on Scheme 7
TracePro COM Interface 8
TracePro COM 8
TracePro Type Library 8
TracePro<edition> Object 8
TracePro Interface 9
Changing the TracePro COM server 10
TracePro DDE Interface 10
Introduction 10
TracePro DDE Server 11

CHAPTER 9 Examples 1
RepTile Examples 1
Aperture Diffraction Example 22
Applying Importance Sampling to a Diffracting Surface 26
Volume Flux Calculations Example 29
Sweep Surface Example 33
Revolve Surface Example 36
Using Copy with Move/Rotate 38
Anisotropic Surface Property 41
Creating an anisotropic surface property in TracePro 42
Applying an anisotropic surface property to a surface 42
Elliptical BSDF 43
Creating an Elliptical BSDF property 43
Applying an elliptical BSDF surface property to a surface 44
Using TracePro Diffraction Gratings 46
Using Diffraction Gratings in TracePro 46
Ray-tracing a Grating Surface Property 49
Example Using Reverse Ray Tracing 51
Specifying reverse rays 52
Example Using Luminance/Radiance Maps 65
Example Using Photorealistic Rendering 67

TracePro 2022 User’s Manual xi


xii TracePro 2022 User’s Manual
What is TracePro?

CHAPTER 1 Introduction

What is TracePro?
TracePro is a ray tracing program for optical analysis of solid models. TracePro
traces rays using “Generalized Ray Tracing”. This technique allows you to launch
rays into a model without making any assumptions as to the order in which objects
and surfaces will be intersected. At each intersection, individual rays can be
subject to absorption, reflection, refraction, diffraction and scatter.
As the rays propagate along different paths throughout the solid model, TracePro
keeps track of the optical flux associated with each ray. TracePro fully accounts
for the absorption, specular reflection and refraction, diffraction, and the scattering
of light.
The best way to use TracePro is to follow the outline below for starting a new
TracePro project. These steps will be discussed in greater depth in the following
sections.
1. Chapter 2, 'Creating a Solid Model' - The first step is to build or import a
geometrical model representing the system you wish to analyze. If you are
building a model from scratch, the geometry usually starts simply and
eventually grows to a very accurate and detailed representation of your system
over the life of the project.
2. Chapter 3, 'Defining Properties' - Material and surface properties representing
desired attributes such as reflection, refraction, absorption and scatter are
defined for your geometrical model. If appropriate, you can use properties
already defined in the TracePro property databases, or you can tailor
properties to satisfy your specific needs.
3. Chapter 4, 'Applying Properties' - Once properties are defined, you can apply
the properties onto the appropriate objects and surfaces in your model.
4. Chapter 5, 'Ray Tracing and Optimization' - Rays are traced through the model
by defining ray starting points as either grid sources, surface sources or
imported sources. How the rays are launched into the model, and which
raytrace parameters are invoked is usually closely tied to the analyses you
wish to do on the system after the fact.
5. Chapter 6, 'Analysis' - A variety of analysis options are available to determine
the location, extent and distribution of the resultant flux from the raytrace.
Analysis options are extensive and include irradiance, illuminance, candela
and volume flux maps as well as detailed ray history information that can be
saved to data files for post-processing.
If you are new to TracePro, you will find that the user interface is easy to learn and
you should be able to master each of these steps in very short order.

Why Solid Modeling?


Solid modeling is a technique for constructing computer models of geometrical
systems using “solid” pieces of virtual material, just as you build real hardware out
of real material. By using solid modeling you can be confident that you are
modeling something that is physically buildable and you obtain a consistency of
modeling that avoids many modeling errors. Solid modeling is gaining wide

TracePro 2022 User’s Manual 1.1


Introduction

acceptance among mechanical designers. It is used in many finite element


analysis (FEA) programs and mechanical computer aided design (CAD)
programs.
Using solid modeling makes sense for an optical analysis program for several
reasons:
1. It uses established technology for modeling physical systems, including Non-
Uniform Rational B-Spline (NURBS) surfaces.
2. It shares or exchanges data with other design and analysis programs.
3. It connects associated material properties, such as index of refraction, to solid
objects in the model.
4. It prevents some of the most common modeling errors, such as making a solid
cube with only five sides.

How Does TracePro Implement Solid Modeling?


TracePro is based on a solid modeling engine. Using this modeler, TracePro can
exchange data with most other based CAD and analysis programs via IGES,
STEP and other CAD formats using built-in translators. TracePro can also import
lens design files from popular lens design programs.
Any entities that you create in TracePro are referred to collectively as a “model.”
Contained in this model are the individual pieces of solid geometry that are called
“objects.” By using a solid modeling approach, TracePro requires that all solid
objects must be bounded by surfaces. Objects can be defined within TracePro, or
they can be defined elsewhere (as in a CAD program) and imported into
TracePro. Objects within the TracePro solid model can be manipulated in a
number of different ways including the action of combining two or more objects
into a single object so that the only surfaces the object now has, are the
“bounding” or “outer” surfaces of the object.

Why Monte Carlo Ray Tracing?


In TracePro modeling, the Monte Carlo method is used to simulate the scattering
and diffraction of light, and to sample of the distributions of rays emanating from
light sources. In the absence of scattering and diffraction processes, light travels
in discrete directions which are exactly modeled by ray tracing. However, when
light scatters from a surface, it produces a continuous distribution of light. One
could in principle calculate the propagation of light exactly by propagating this
distribution to the next surface, then cascade this distribution with the distribution
produced by the next surface, and so on, until the irradiance in the light field is so
low that it can be neglected. To model light propagation in this way can require an
enormously complicated computer program.
The Monte Carlo method is a technique for computing the outcome of random
processes. It is used for modeling quantum-mechanical processes that can only
be described by their statistics. Monte Carlo as applied to the propagation of light
can also be described as a technique for numerical integration. As such it is used
when conventional numerical integration techniques cannot be used because the
problem to be solved is not amenable to those techniques.
In Monte Carlo ray tracing, scattering and diffraction are treated as random
processes. Instead of propagating a distribution of light, discrete samples of the
distribution, or rays, are propagated. The samples are randomly chosen, using the

1.2 TracePro 2022 User’s Manual


The TracePro Graphical User Interface

scattering distribution as a probability density. This allows the well-developed


techniques of ray tracing to be used to model scattering.
In “brute force” Monte Carlo ray tracing, the directions of rays are chosen
randomly, and a reliable answer is obtained by tracing a very large number of
rays. TracePro makes use of variance reduction techniques to reduce the number
of rays required to get a reliable result.

The TracePro Graphical User Interface


TracePro is designed to provide an easy-to-use graphical interface for viewing the
model; adding solid objects to it; and applying material properties, surface
properties, and source properties. There are many toolbar buttons for quick
access to commands, and a pop-up menu is available with frequently-used
commands. The pop-up menu opens by clicking the right-hand mouse button.

TracePro Desktop Pop-up menu


Menu Bar

Toolbars

System
Tree

Status Bar Model Window

FIGURE 1.1 - TracePro desktop and window features.

Toolbars
The toolbar buttons allow for quick access to many of the features in TracePro.
The toolbars are dockable and can be moved to different locations if desired. The
toolbar settings can be controlled at View|Toolbars.

TracePro 2022 User’s Manual 1.3


Introduction

FIGURE 1.2 - Toolbar settings

Model Window
The window in which geometry is displayed is the Model Window. When you open
a TracePro file (referred to as a model) a Model Window opens with the geometry
displayed as a silhouette in the side view. This is the y-z view, with the y axis
pointing up and the z axis pointing to the right, a common convention in optics.
The View|Profile commands (YX, ZY, ZX, XY, XZ and YZ) let you choose the
right orthogonal view.
You can zoom in and out using the mouse wheel, and you can also Pan, Zoom
and Orbit using the mouse and Ctrl or Shift Keys.

The functions and key combinations are:


View|Pan is performed by pressing Ctrl key and the
Right mouse button
View|Rotate|Orbit is performed by pressing the Shift key and the
Right mouse button
View|Zoom|Cursor is performed by pressing the Ctrl key and
pressing the Middle mouse button (or pressing
the mouse wheel)
View|Zoom|Window is performed by pressing the Shift key and
pressing the Middle mouse button (or pressing
the mouse wheel)

Note: Press the Key first, then the Mouse button. You will see the appropriate
toolbar item activate.

1.4 TracePro 2022 User’s Manual


The TracePro Graphical User Interface

Multiple Models in Multiple Views


TracePro has a multiple document/multiple view interface. This means that you
can have many models or files open at one time, and you can also have many
views of each model open at one time.
To open multiple views of the same model, simply select the desired model
window by clicking on it with the mouse, then select the Window|New Window
menu item multiple times. You can also do this quickly by pressing the New
Window toolbar button multiple times.

A B C D

FIGURE 1.3 - Window control Toolbar buttons: A) New Window, B) Cascade


Windows, C) Tile Windows Horizontally, D) Tile Windows Vertically

Once multiple model windows have been created, you can view your model
independently in each of the views. Windows can be cascaded, tiled, and
minimized using the usual Windows controls, available either on the Window menu
or the toolbar shown in Figure 1.3.
If you would like different models open at the same time, simply open them from
the File|Open... menu item or use the Open toolbar button. The desired model
will be opened in a new window. Once the desired model windows are open, you
can manipulate the models and model windows independently, as in Figure 1.4.
It is important to remember that any action you take (i.e. tracing rays, applying
properties,...etc.) will be applied to the currently active model from the selected
window. When working with multiple windows in TracePro, you must remember to
select the desired model window before choosing the action that is to be
performed.

TracePro 2022 User’s Manual 1.5


Introduction

FIGURE 1.4 - A single model viewed in different orientations in multiple


model windows. The image also includes a Rendered view (upper
right), and Wireframe view (lower right).

System Tree Window


The System Tree Window at the side of the Model Window allows you to view and
manage various system items in hierarchical tree formats. There are three tabs at
the bottom of the System Tree Window describing the items that can be
displayed:
• The Model tab reveals the Model Tree and allows you to manage the objects
and surfaces of the model
• The Source tab reveals the Source Tree and allows you to manage the
sources in the model (see page 5.3)
• The Luminance/Radiance tab reveals the Luminance/Radiance Tree and
allows you to manage the setup of Luminance/Radiance calculations (see
page 6.18). Note that the wording of the Luminance/Radiance tab in the Sys-
tem Tree window is automatically set to either Luminance or Radiance by
TracePro depending on the analysis units of the model (see page 5.43).
If the System Tree Window is not already visible, you can reveal it by clicking and
pulling on the splitter bar on the side of the Model Window with the mouse. The
default position for the splitter window is on the left side of the model window, but
this can be changed on the View page in the View|Options dialog box.
The splitter bar is illustrated in Figure 1.5 in its default location. You can also
display the Splitter Cursor by selecting the Window|Split menu.

1.6 TracePro 2022 User’s Manual


The TracePro Graphical User Interface

Splitter Bar

FIGURE 1.5 - The System Tree Splitter Bar at the default location

After you open the System Tree split window, as in Figure 1.6, you can look for a
“+” character to indicate that you can “expand” an object to display its surfaces.
Further, you can use the System Tree to select surfaces with a + character to
expand.

FIGURE 1.6 - The System Tree made visible by moving the splitter bar

If you select an object or surface in the System Tree, that object or surface
changes color to black to indicate the selection. Similarly, if you select an object or

TracePro 2022 User’s Manual 1.7


Introduction

surface in the Model Window, you can see the selection as highlighted in the
System Tree.

FIGURE 1.7 - The System Tree window after expanding Object 4

After Object 4 is expanded, you can see:


• Individual Surfaces
• Material property Catalog
• Material property Name
Selecting a surface in the System Tree highlights it in the Model Window. If you
select and expand a surface on the system tree, you can also see the:
• Surface property
• Optional source property.
It is recommended that you leave the system tree view open. An open system tree
view helps you:
• Visualize your work
• Select surfaces and objects

System Tree Selection


The System Tree includes additional surface type information for spline surfaces.
In addition, property information can be accessed directly by double clicking on
the data items. Figure 1.8 shows a typical object with expanded tree items.
Double clicking on either of the Material items will open the Apply|Properties
dialog and display the Material page. Double clicking on one of the Surface items
will result in the Surface page being displayed. Clicking on a non-property items,
like the Entity number, will be ignored.
Each object is preceded by a Green Check or Red X. Clicking on this flag will
enable or disable the “Raytrace Flag” for the raytrace. If the item has the Red X,
the Raytrace Flag is off and the object will be removed from the raytrace.

1.8 TracePro 2022 User’s Manual


The TracePro Graphical User Interface

FIGURE 1.8 - System Tree

Re-arranging the System Tree


You can re-arrange the system tree by changing the order of objects or by making
groups of objects. To make a new group, right-click on the tree in location where
you would like the group, and select New Object Group from the pop-up menu.
To move a selection of objects and/or groups, either to a new group or to a new
location in the System Tree, first right-click and select Enable Drag/Drop. Then
select the objects/groups you wish to move, and drag the selection to the new
location in the tree. When you are done re-arranging the tree, you should unselect
Enable Drag/Drop in order to avoid accidentally re-arranging the tree while doing
other operations.

Context Sensitive Menus


TracePro provides context sensitive menus based on the active window. The
Model Window is the most common window displayed and has its own main menu
(File, Edit, View, etc.). The main menu will change when Property Editors or
Analysis windows are opened and activated. These windows will be described
later in the manual but it is important to note that the active window controls the
menubar. To return to a specific menu, click in the desired window or select from
the list under the Window menu.

Model Window Popup Menus


In addition to the main menu, each window may have one or more Popup menus.
These menus are displayed by right-clicking with the mouse.
Figure 1.9 shows the three Model window menus which vary based on the state of
the current selection. See “Selecting Objects and Surfaces” on page 1.11.

TracePro 2022 User’s Manual 1.9


Introduction

FIGURE 1.9 - Model window popup menus for No Selection, Object


Selection, Surface Selection.

System Tree Popup Menus


Figure 1.10 shows the two System tree menus which vary based on the item
clicked.

FIGURE 1.10 - System tree menus for Object and Surface Selection.

1.10 TracePro 2022 User’s Manual


The TracePro Graphical User Interface

User Defaults
User Defaults store the initial dialog entries into a file named tpdefs.ini. Raytrace
and Analysis dialogs contain the Set Defaults button used to store the dialog data.
Pressing Set Defaults is equivalent to pressing the Apply button. Once the
defaults are updated, TracePro will use the new values the next time the program
is started. To return to the factory defaults, select View|Options|Reset
Defaults, and reset any or all default values, as desired.

Objects and Surfaces

Changing the Names


In order to better organize your model, you should apply names to objects and
surfaces to replace the default names like “Object 1” and “Surface 1.” As with
renaming most items in the Microsoft Windows environment, simply select the
default name in the system tree with one click and click it again (or press F2 on
your keyboard) to enable name editing.
To change the default name “Object 1” to “First Lens,” for example, select Object 1
in the System Tree and click it again. As you click the words “Object 1” a second
time, the name is highlighted and you enter name editing mode. Type in the new
name to replace the default one. The name is not a unique identifier—be careful!
Any number of objects or surfaces can be given the same name.
When an object is created from a TracePro dialog box, an entry is provided to set
the name of the object. A default name is provided based on the type of object
created and the number of objects of the given type plus one. For example the
first block entered would be named “Block 1”. You can enter any name you wish
and names do not have to be unique.

Selecting Objects and Surfaces


Via the System Tree
To select an object via the System Tree, simply click on the name of the object. To
choose a particular surface in your model, first make sure that the appropriate
object is expanded (see the section “System Tree Window” on page 1.6), and
then click on the desired surface name. Remember that the names in the System
Tree can be changed and that when you choose a surface or object in the System
Tree, the corresponding item is highlighted in the Model Window. An edge cannot
be selected from the System Tree.
You can select several objects by extending the selection with the Shift or Ctrl
keys. To use the Shift key, select the first item and then select the second item
while holding down the Shift key (this is known as a Shift Select). All of the objects
between the first and second selections will be added to the current selection set.
If you use the Ctrl key with the second selection, only the first and second items
will be added. You can use the Ctrl Select method to add several items to the
selection set.
Note: The Shift Select method will work only when selecting the same type of
item. If the first selection is an Object and the Shift selection is a surface, only the
surface item will be selected.

TracePro 2022 User’s Manual 1.11


Introduction

Via the Model Window


To select an object, first press the Select Object toolbar button or select the
Edit|Select Object menu item, then click on the object in the Model Window.
You can also use the selection tool in rubberband mode. Click the mouse button
down on one corner of a region, drag the cursor to the opposite corner and
release, and all the objects in the region are selected. Selected objects are
highlighted.
To select a surface, first press the Select Surface toolbar button or select the
Edit|Select Surface menu item, then click on the surface. You can also use the
selection tool in rubberband mode. Click the mouse button down on one corner of
a region, drag the cursor to the opposite corner and release, and all the surfaces
in the region are selected. Selected surfaces are highlighted in the highlight color.
The rubberband selection tool has two modes:
• Drag left to right: Any surface that has any part inside the rectangle is
included in the selection.
• Drag right to left: Any surface that is completely enclosed inside the rectangle
is included in the selection. This can also be accomplished by Shift-drag-left-
to-right.

Advanced Selection Dialog


Surfaces and Objects can also be selected by type and property using the
Advanced Selection Dialog. For example, if the mirrors in a TracePro Model
currently have the Surface Property “Perfect Mirror” applied, but the accuracy of
the model now necessitates that a more detailed property be substituted that
includes some scatter and absorption, the Advanced Selection feature can be
used to select all surfaces in the model that are currently have “Perfect Mirror”
applied, so they can all be changed to the new mirror property in one step.
Select Edit|Select|Advanced to open the Advanced Selection dialog.

FIGURE 1.11 - Advanced Selection Dialog.

The dialog has the following options and functions.


Selection Type – The selection types are as follows:
• Material Property
• Surface Property
• Bulk Scattering Property
• Gradient Index Property

1.12 TracePro 2022 User’s Manual


The TracePro Graphical User Interface

• RepTile Property
• Surface Source
• TracePro Lens (geometry recognized as originating from Insert Lens Element
dialog)
• TracePro Reflector (geometry recognized as originating from Insert Reflector
dialog)
• Class and User data
Catalog – the name of the Property Catalog (corresponding to the Property
Editor)
Name - the Property Name (corresponding to the Property Editor)
Select First – This button selects only the first object and/or surface meeting the
criteria of the Selection Type, Catalog, and Name fields. Once Select First has
been activated, the button changes to Select Next, and can be used multiple
times to select subsequent objects and/or surfaces that meet the selection
criteria.
Select All – selects all objects and/or surfaces meeting the criteria of the
Selection Type, Catalog, and Name fields
Close – closes the Advanced Selection dialog
Append item(s) to current selection – With this box checked, the action of the
Select First or Select All button will be to append the new selection to any
previous selection of objects and/or surfaces. If this box is left unchecked, the
action of the Select First or Select All button will be to replace any previous
selection of objects and/or surfaces.

Moving Objects and Other Manipulations


Manipulating objects starts by making a selection as described above. To add
more objects to the selection, hold down the Ctrl key on the keyboard and click
the objects with the mouse.
To move the selected object(s), press the Translate toolbar button or select the
Edit|Object|Translate menu item, and simply drag them to a new location
using the mouse while pressing the left mouse button.
You can drag a copy of the selection by holding down the Ctrl key while you drag
with the mouse. These are all standard Windows editing features.
You can also move the objects to a numerically precise location by using the
Edit|Object|Move dialog box, and rotate objects using the
Edit|Object|Rotate dialog box.
You can Cut, Copy, and Paste solid objects using the standard Windows editing
controls.
Finally, you can create arrays of objects by clicking the Copy button in the
Edit|Object|Move and Edit|Object|Rotate dialog boxes.

Interactive Viewing and Editing


Using the controls on the View and Edit menus, you control the view using the
mouse and move and rotate objects or groups of objects. For example, you can
zoom in or out, zoom to a rectangle drawn with the mouse, and rotate the view.

TracePro 2022 User’s Manual 1.13


Introduction

The coordinates of the mouse are always displayed on the status bar at the
bottom of the TracePro application window. The set of coordinates on the right
shows the current cursor position. The values shown on the left display the
coordinates of the last mouse click. See “Changing the Model View” on page 2.50.

Normal and Up Vectors


TracePro uses a three-dimensional coordinate system with a global origin and X,
Y, Z vectors to indicate directions. Often a plane must be defined to establish how
the model will be viewed or how data will be displayed. The orientation of this
plane is defined in terms of two direction vectors, the Normal and Up vectors.
The Normal vector is simply the direction Normal to the plane. You can think of
planes as your computer screen or a piece of paper in a book laid out flat on a
table. The direction perpendicular to the screen or paper is the normal vector.
The Up vector generally is used to arbitrarily reference the direction which is
considered up or the Y direction. A rectangular plane, for example, has a height
and a width which differ in size. Defining the Up vector along the long edge would
define the height to be the long dimension and the width to be the short
dimension. The reverse is equally valid.
TracePro does not make any assumptions about how the model is defined in
space and thus requires you to intervene by defining these vectors. For optical
engineers and lens designers the Image Plane would have a Normal vector equal
to X=0, Y=0, and Z=1 with an Up vector or X=0, Y=1, and Z=0. Lighting designers
who typically consider lights above the target often think of this target plane to
correspond to a Normal vector of X=0, Y=-1, and Z=0 with an Up vector defining
the direction of the zero azimuthal angle in the XZ plane depending on the Model
orientation.
The Normal and Up Vectors are defined as Unit Vectors that TracePro will
normalize to have a unit length of 1.0. Each value is scaled as shown

2 2 2
t = X +Y +Z (1.1)

X
X n = --- (1.2)
t

Y
Y n = --- (1.3)
t

Z
Z n = --- (1.4)
t
where t is the scaling factor. The normalized values of X, Y and Z are given by Xn,
Yn, and Zn.
The concept of planes oriented with the Normal and Up vectors provides a flexible
environment to build and analyze models but may take some practice to become
comfortable with its use in TracePro.

1.14 TracePro 2022 User’s Manual


The TracePro Graphical User Interface

Modeling Properties
TracePro includes a database of property data for modeling optical and
mechanical material properties and surface properties. In addition to the data that
is already available within TracePro, you can customize properties by entering
measured data.
• Object properties are applied to objects and affect the entire volume of the
object. These include the material property which specifies the index of refrac-
tion and absorption coefficient of the bulk material, temperature, bulk scatter-
ing, and fluorescence.
• Surfaces define the boundaries of objects. The surface properties specify
parameters that apply to a surface of an object such as the surface property
(absorptance, specular reflectance, specular transmittance, BRDF and BTDF),
surface source property, and surface temperature.
• The surface source property specifies how a surface emits light. Other proper-
ties are used to identify special characteristics of a surface or object.
The details of how these properties are defined and how they can be changed are
described in Chapter 3.

Applying Properties
In order for a TracePro model to behave properly when doing any type of ray
tracing or analyses with your model, you will need to apply optical, mechanical
and source properties to the appropriate objects and surfaces. A good way to get
a quick preview of how properties are applied is to click on the Define|Apply
Properties menu item. The Apply Properties dialog box will open with multiple
panes accessible by clicking on the list at the left. In Chapter 4 you will learn how
to apply these properties.

Modeless Dialog Boxes


Many TracePro operations are performed using dialog boxes. Many TracePro
dialog boxes are modeless. A modeless dialog box means that you can do other
tasks while the dialog box is open.
Modeless dialog boxes let you have several dialog boxes open at one time. For
example, if you open the Apply Properties dialog box, a modeless dialog box, you
can then press the Select Surface toolbar button. You can then go back to the
Apply Properties dialog box and select the Surface Properties tab.
Now go to the Model window and click a surface to which you plan to apply
surface properties. You can go back to the dialog box, select the properties to
apply, then press the Apply button to apply them to the surface.

Expression Evaluator
In many dialog boxes within TracePro, you will encounter numerical data entry
fields that have a yellow background color. This color indicates that the field has a
built-in expression evaluator. (See “Background colors” on page 2.58.) You can
enter a mathematical expression in these fields that evaluates to the number you
desire. Mathematical operators that you can use include +, -, *, /, and
trigonometric functions. In order for the expression evaluator to interpret the field
entry as a mathematical expression, the expression must start with the equal sign

TracePro 2022 User’s Manual 1.15


Introduction

(=). The result of the expression evaluator will not be shown in the field box, but
the appropriate value will be used in the model in place of the expression.

FIGURE 1.12 - Portion of a dialog box showing an example of the


Expression Evaluator. The Expression Evaluator can be used in any
numerical data entry field which has a yellow (default) background.

For a complete list of valid input for expression see Table 1.1
.

Table 1.1: Expression Evaluator Commands


Name Example Result
Operators
u Unary Minus =-6 -6
+ Add =12 + 2 14
- Subtract =12 – 2 10
* Multiply =12 * 2 24
/ Divide = 12 / 2 6
^ Power = 12 ^ 2 144
% Modulus =12%6 0
=12%5 2
Constants
PI pi =PI 3.14159
E e =E 2.71828

Functions
SIN Sin (Radians) =sin(PI/4) 0.707107
COS Cosine (Radians) =cos(PI/4) 0.707107
TAN Tangent (Radians) =tan(PI/4) 1.0
SIND Sin (Degrees) =sind(45) 0.707107
COSD Cosine (Degrees) =cosd(45) 0.707107
TAND Tangent (Degrees) =tand(45) 1.0
ASIN ArcSin (Radians) =asin(0.707107) 0.785398
ACOS ArcCos (Radians) =acos(0.707107) 0.785398
ATAN ArcTan (Radians) =atan(1) 0.785398

1.16 TracePro 2022 User’s Manual


Context Sensitive OnLine Help

Table 1.1: Expression Evaluator Commands


ASIND ArcSin (Degrees) =asind(0.707107) 45
ACOSD ArcCos (Degrees) =acosd(0.707107) 45
ATAND ArcTan (Degrees) =atand(1) 45
ABS Absolute Value =abs(-12) 12
MAX Maximum Value =max(1.2,3.4) 3.4
MIN Minimum Value =min(1.2,3.4) 1.2
LOG Log base 10 =log(12.3) 1.08991
LN Natural Log =ln(12.3) 2.5096
EXP Exponential =exp(2.03) 7.61409
SQRT Square Root =sqrt(144) 12
RAN Random Number =ran .3801
0.0 - 1.0
STEP Step Function =step(2) 1
DELTA Delta Function =delta(-2) 0
SQRWV Square Wave =sqrwv(2,3,1) 1
(x, period, phase)

Context Sensitive OnLine Help


TracePro has context sensitive online help. Help is available on features in the
program by using the Help toolbar button, or pressing the Shift + F1 key. This is a
standard Windows feature. Press the Help Button, then select the menu item or
dialog box, or press the toolbar button for which you want help. You can also
press F1 while the cursor is highlighting a menu item to get help regarding that
selection.
There is also reference material available in TracePro. Use the Help Topics
menu or Macro Reference menu to obtain reference material.

TracePro 2022 User’s Manual 1.17


Introduction

Command Line Arguments


TracePro is normally started from Windows like any other application. However,
TracePro can also by started from the command line, Run dialog or have
command line options appended to a TracePro shortcut in Windows. These
methods are described within the Windows documentation.
The following lists the syntax and parameters for the TracePro command line
options.

TracePro
[/m] [/nologo] [/SNxxxx]
[scheme_file] 
[“(scheme command)”]
[/d] [/h heap_size] [/tnn]

Example:
TracePro /nologo g:/test.scm “(test2 123)”
The arguments as are follows:
• Setting /m will start TracePro in a minimized mode.
• Setting /nologo will inhibit the display of the TracePro Splash Screen.
• Setting /SNxxxx will make “xxxx” the DDE service name which is TRACEPRO
by default. This is used so multiple instances of TracePro can by accessed by
DDE.

• Standard ExpertThe scheme_file is an ASCII file ending in the SCM


extension which contains the TracePro macro commands to load and
optionally execute.

• Standard Expert The scheme command is any set of valid macro


commands with or without optional arguments contained between two double
quotes. The left and right parentheses are required. The command can be a
function contained in a file loaded from the command line or from the Auto
Load macro.

• Standard Expert Setting /d suppresses the Auto Load macro defined in


the View|Customize dialog.

• Standard Expert Setting /h specifies scheme heap size in kilobytes. The


default is 32768 for x86 systems and 16384 for x64 systems. You may need to
increase this if you are loading large Scheme programs.
• Setting /t specifies the maximum number of threads TracePro will use. For
example, to specify no more than 2 threads, use /t2.
Note: the forward slash, “/”, is equivalent to the hypen, “-“, to delineate command
line arguments. The forward slash is equivalent to the backward slash, “\”, when
entering the location and path for a file.
TracePro /nologo g:/test.scm “(test2 123)”
is equivalent to
TracePro -nologo g:\test.scm “(test2 123)”

1.18 TracePro 2022 User’s Manual


Using a Language other than English

Using a Language other than English


TracePro can be used in any of several languages other than English, including
Chinese (simplified) Chinese (traditional), Japanese, Korean, Italian, and Spanish.
After you install TracePro and start it for the first time, the language will be set to
English. To set it to another language, Select Tools|Change Language and select
the language you wish to use. You must close TracePro and re-open it to see the
menus in the new language. On-line help is in English regardless of the language
setting.

TracePro 2022 User’s Manual 1.19


Introduction

1.20 TracePro 2022 User’s Manual


Introduction to Solid Modeling

CHAPTER 2 Creating a Solid Model

Introduction to Solid Modeling


Solid modeling is a technique for constructing computer models using “solid”
pieces of virtual material, just as you build real hardware out of real material. In a
solid model, objects are three dimensional entities defined to be bounded by
surfaces. By using solid modeling, you inherently obtain a consistency of
modeling that avoids many modeling errors. You can be confident that you are
modeling something that is physically realizable.
There are many ways to define and manipulate objects in solid modeling; it is a
field in its own right. TracePro offers several ways to create and manipulate solid
objects:
• Import data from a solid modeling program,
• Import data from a lens design program - TracePro creates a solid model auto-
matically,
• Create primitive solid objects including blocks, cylinders and cones, spheres,
tori, and thin sheets,
• Create solid objects needed for optomechanical systems including optical ele-
ments, reflectors and concentrators, Fresnel lenses, tubes, and baffle vanes,
• Create complex solid objects from primitive solids using Boolean operators:
Intersect, Subtract, and Unite, and
• Modify solid objects by using the Sweep and Revolve commands.

Model Units
TracePro Models may be constructed and viewed in several units of measure.
The dialogs described in this chapter and throughout the manual refer to Model
Units. The Model Units are set as a preference and stored with the Model data in
the TracePro OML file. See “General” on page 2.57.
Internally TracePro stores geometry data and performs calculations in units of
millimeters (mm). The Model Units are used to scale dialog inputs and display
outputs from millimeters to the desired dimensional units.

Position and Rotation


Many of the dialogs provide options for position and rotation. During construction
TracePro will build the object at the global origin and change the orientation
(position and rotation) based on the input data. An object’s position is set by the
object’s Working Coordinate System (WCS) from the global origin. TracePro
provides an option to display the object’s WCS which may be centered or
coincident with a surface vertex. See “Display Object WCS” on page 2.54.
Rotation is performed relative to the object WCS using Euler Angles. This is
similar to rotating surfaces in lens design programs. The rotations are performed
first about the x-axis, then about the y-axis and then about the z-axis. The
resulting orientation is not necessarily unique. For instance rotating an object by
90 degrees about the x-axis and then the z-axis will be the same as rotating the

TracePro 2022 User’s Manual 2.1


Creating a Solid Model

object by 90 degrees about the y-axis and then performing a second rotation of 90
degrees about the x-axis. A translation of the object’s center position is performed
after the rotations.

Defining Primitive Solid Objects


Simple or primitive solid objects are created in TracePro using the
Geometry|Primitive Solid menu item and the dialog box it opens. It is a
tabbed dialog box, with tabs for Block, Cylinder/Cone, Torus, Sphere, and Thin
Sheet.

FIGURE 2.1 - Insert Primitive Solid dialog box

The Block, Cylinder/Cone and Torus tabs let you specify rotation angles for the
solid. Each of these angles are rotations about the coordinate axes. When you
select the Insert button, the solid is created at the origin, then rotated first about
the x-axis, then about the y-axis, then about the z-axis, and finally moved to the
position you have entered.
Many of the objects created within TracePro can be modified with the same dialog
that created them--note the Modify button in Figure 2.1. You can select an existing
primitive object and then use the Geometry|Primitive Solid dialog box to
access and change the data by pressing the Modify button. Note that the Modify
button will be disabled if you don’t have an appropriate primitive solid selected in
the model window.

2.2 TracePro 2022 User’s Manual


Defining Primitive Solid Objects

Block

FIGURE 2.2 - Block primitive object

To create a block:
1. Select the Block tab of the Insert Primitive Solids dialog box.
2. Enter the X, Y, Z width dimensions of the block.
3. Enter the X, Y, Z coordinates of the center of the block under Center Position.
4. If you wish to rotate the block, enter the X, Y, Z coordinate rotation angles.
5. Press the Insert button to create the block.
If it is not visible in the current view, it is either too small to be seen, or it is outside
the view. You can either Zoom Window (if it’s too small), Zoom All (if it’s too large
or outside the view) or Zoom Selection to make it visible.

Cylinder/Cone

FIGURE 2.3 - Cylinder primitive object

To create a Cylinder:
1. Select the Cylinder/Cone tab of the Insert Primitive Solids dialog box.
2. Select the Cylinder radio button.

TracePro 2022 User’s Manual 2.3


Creating a Solid Model

3. Enter the X, Y, Z position of the base of the cylinder.


4. Enter the radius of the cylinder.
5. Enter the length of the cylinder.
6. If you wish to rotate the cylinder, enter the X, Y, Z coordinate rotation angles.
An unrotated cylinder has its axis along the z-axis.
7. Press the Insert button to create the cylinder.
If you want an elliptical cylinder, check the Elliptical box and enter the Minor
Radius.

FIGURE 2.4 - Cone primitive object

To create a Cone:
1. Select the Cylinder/Cone tab of the Insert Primitive Solids dialog box.
2. Select the Cone radio button.
3. Enter the X, Y, Z position of the base of the cone.
4. Enter the base radius of the cone.
5. Enter the length of the cone.
6. Enter the top radius of the cone.
7. If you wish to rotate the cone, enter the X, Y, Z coordinate rotation angles. An
unrotated cone has its axis along the z-axis.
8. Press the Insert button to create the cone.
If you want an elliptical cone, place a check mark in the Elliptical check box and
enter the Base Minor Radius.
If it is not visible in the current view, it is either too small to be seen, or it is outside
the view. You can either Zoom Window (if it’s too small), Zoom All (if it’s too large,
too small, or outside the view) or Zoom Selection to make it visible.

Torus
A torus is a doughnut-shaped object. The major radius and the minor radius are
indicated in Figure 2.5.

2.4 TracePro 2022 User’s Manual


Defining Primitive Solid Objects

FIGURE 2.5 - Torus primitive object showing major and minor radii

To create a torus:
1. Select the Torus tab of the Geometry|Primitive Solids dialog box.
2. Enter the Major Radius and Minor Radius.
3. Enter the X, Y, Z coordinates of the center of the torus under Center Position.
4. If you wish to rotate the torus, enter the X, Y, Z coordinate rotation angles. An
unrotated torus has its axis along the z-axis.
5. Click the Insert button to create the torus.
If it is not visible in the current view, it is too small to be seen or it is outside the
view. You can select Zoom Window (if it’s too small), Zoom All (if it’s too large or
outside the view) or Zoom Selection to make it visible.

Sphere

FIGURE 2.6 - Sphere primitive object

To create a sphere:
1. Select the Sphere tab of the Geometry|Primitive Solids dialog box.
2. Enter the radius of the sphere.

TracePro 2022 User’s Manual 2.5


Creating a Solid Model

3. Enter the X, Y, Z coordinates of the center of the sphere under Center Position.
4. Click the Insert button to create the sphere.
If it is not visible in the current view, it is either too small to be seen, or it is outside
the view. You can either select Zoom Window (if it’s too small), Zoom All (if it’s too
large or outside the view) or Zoom Selection to make it visible.

Thin Sheet
A thin sheet is a solid object that has only one planar surface, and therefore no
thickness or volume. It is useful for “catching rays” or as a starting plane for
sweeping or revolving to create a true solid object. A thin sheet object may be
defined with one of several possible boundary shapes:
• Circle
• Ellipse
• Rectangle
• Regular Polygon
• Irregular Polygon

Except for the irregular polygon, the boundary is specified by:


• Dimensions
• Center position
• Rotation angles

Creating a thin sheet object with no rotation angles results in a surface with its
normal along the +Z direction, unless it's an irregular polygon. Any subsequent
sweep or revolve operation along the surface normal will thus be in the +Z
direction.
A regular polygon is one with equal length sides and equal angles, e.g. equilateral
triangle, square, pentagon, hexagon, etc. The radius is measured from the center
to a vertex, i.e. the radius of a circumscribed circle.
An irregular polygon is specified using at least three different positions consisting
of X, Y and Z values. All the positions must lie in the same plane. X, Y and Z are in
the current Model Units. The positions are connected by linear edges, with the last
point being connected to the first point to close the boundary. This closed loop is
then covered with a surface and made double-sided. Note: The surface normal of
an irregular polygon thin sheet follows the right-hand rule using the "curl" of the
sequence of positions.
Thin sheets may be used as reflectors or reference surfaces, and may be
Extruded (Swept) or Revolved to create regular thick objects.
Thin sheets can also be used as “observation” surfaces available for viewing by
an Irradiance Map as rays propagate through the model, such as reference
planes within a lightpipe.

2.6 TracePro 2022 User’s Manual


Defining Primitive Solid Objects

FIGURE 2.7 - Thin Sheet primitive objects

To create a new thin sheet, first select the Primitive Solid command from the
Geometry menu. Then click on the Thin Sheet tab and enter the appropriate
data. Finally, click Insert, and the Thin Sheet will be created.
If the thin sheet is not visible in the current view, it is either too small to be seen, or
it is outside the view. You can either select Zoom Window (if it’s too small), Zoom
All (if it’s too large or outside the view) or Zoom Selection to make it visible.

FIGURE 2.8 - Insert Primitive Solids dialog box: Thin Sheet tab

TracePro 2022 User’s Manual 2.7


Creating a Solid Model

Name Enter a name for the object


Shape Choose the shape as either Circle, Ellipse, Rectan-
gle, Regular Polygon, or Irregular Polygon
Dimension(s) Enter radii or widths depending on the shape choice
(except for Irregular Polygon)
Center Position Enter the center position with X, Y and Z values
(except for Irregular Polygon)
Rotation Enter the rotation angles about the X, Y and Z axes
(except for Irregular Polygon)
Points Enter each vertex point with X, Y and Z values
(Irregular Polygon only).
Insert Create a new thin sheet object
Modify Modify a previously created thin sheet object
Clear Grid Erases all data from the cells

Limitations:
The thin sheet boundary must be closed. No part of the boundary is allowed to
overlap another part of the boundary. TracePro closes the boundary by
connecting the last point to the first point.
The thin sheet is ordinarily defined as a plane. If you define boundary points that
do not lie in a plane, TracePro will create a spline surface to fill the polygon.
Since the thin sheet has no thickness or volume, applying material properties to
the thin sheet can lead to misleading errors during a raytrace. For this reason
application of the following property types to thin sheets is prevented: Material,
Mueller Matrix, Gradient Index, Bulk Scatter, and RepTile.

Rubberband Primitives
In addition to the dialogs described above, some primitives solids may be defined
interactively using rubberband tools. Spheres, Cylinders, Cones, and Blocks have
rubberband tools.
To create a sphere:
1. Select the Sphere Tool.
2. Hold down the left mouse button and drag to define the radius of the sphere.
3. Release the mouse to display the object.
To define a Cylinder:
1. Select the Cylinder tool.
2. Hold down the left mouse button and drag up or down to define the base
radius of the cylinder. The base radius is defined along the vertical axis of the
screen.
3. Release the mouse button and drag left or right to define the length. The length
is defined along the horizontal axis of the screen.
4. Click the left mouse button to complete the cylinder.

2.8 TracePro 2022 User’s Manual


Defining TracePro Solids

To define a Cone:
1. Select the Cone tool.
2. Hold down the left mouse button and drag up or down to define the base
radius. The base radius is defined along the vertical axis of the screen.
3. Release the mouse button and drag left or right to define the apex of the cone.
The length is defined along the horizontal axis of the screen.
4. Click the left mouse button to complete the cone.
To define a Block:
1. Select the Block tool.
2. Hold down the left mouse button and drag left or right to define the length of
the block’s square base. The length is defined along the horizontal axis of the
screen.
3. Release the mouse button and drag up or down to define the height. The
height is defined along the vertical axis of the screen.
4. Click the left mouse button to complete the block.

Defining TracePro Solids


TracePro allows you to define objects that are commonly used in optomechanical
systems, namely a lens element, Fresnel lens, reflector, tube or baffle vane.

Lens Element
The Geometry|Lens Element menu or Insert Lens toolbar button opens a tabbed
dialog box that allows you to specify completely a lens element including
curvatures (or radii); thickness; material; aperture and obstruction shape and
dimensions; and position and orientation of the element. You can make a mirror
using Geometry|Lens Element by creating the mirror with the desired shape,
then applying a reflective coating to it.
Note: An obstruction is a common term from lens design. An obstruction in
TracePro creates a hole in the lens.

TracePro 2022 User’s Manual 2.9


Creating a Solid Model

FIGURE 2.9 - Insert Lens Element dialog box: Element tab

After you have entered all the data to specify the element, click Insert Lens at the
bottom of the dialog box to create the element. You can create as many elements
as you wish. Simply edit the data for the new element and click Insert Lens again.
To close the dialog box, click the close button on the top bar of the dialog box, or
press the Esc Key on your keyboard.
The Geometry|Lens Element dialog box is a modeless dialog box, so you can
leave it open while you do other things like inserting other solid objects, moving
objects, changing the view, or applying properties.
Note the Modify Lens button in Figure 2.9. You can select an existing Lens object
and then use the Geometry|Lens Element dialog box to access and change the
data by clicking the Modify Lens button. Note that the Modify button will be
disabled if you don’t have an appropriate Lens selected in the model window.
An example of inserting a lens developed in the OSLO lens design software is
shown in “Anisotropic Surface Property” on page 9.41

Element tab
Using the Element tab you can enter
1. Name of the element
2. Center thickness, the center-to-center distance between the two surfaces.

2.10 TracePro 2022 User’s Manual


Defining TracePro Solids

3. Material Catalog
4. Material Name
The default glass is SCHOTT BK7.
To edit a lens element: select the element, change entries, and click the Modify
button in the Geometry|Lens Element dialog box. The Modify button lets you
make a series of sequential edits.
Here are the steps to modify a lens element:
1. Select the lens object in the model window or on the system tree.
2. Select Geometry|Lens Element.
3. Edit the data and click Modify Lens in the dialog box.
TracePro applies your changes.
If you use another tool to edit a lens element—selecting one of the Boolean
operations, for example—TracePro no longer recognizes that the lens element is
still a “lens element.” For example, if you subtract a cylinder from a lens by the
means of a Boolean operation, TracePro sees the result as a generic object rather
than a lens object. You can use the “obstruction” tabbed dialog to accomplish the
same step as long as the cylinder is aligned along the axis of the lens, and in this
case the lens object status is retained.
Altering a lens element is best done by using Modify Lens from the
Geometry|Lens Element dialog box. Editing the lens element in this way lets you
go back as often as you want to make further changes.

Surfaces tab
The Surfaces tab defines the shape of each surface (for First Surface and Second
Surface). Each surface has its own sag formula that is used to define the surface
shape of the lens surface relative to the local surface center or vertex. The Base
Sphere selection at the top of the dialog box determines whether you enter Radius
or Curvature for surface types that require such an entry.
The following surface types are available for creating lens elements:
• Plane
• Sphere
• Conic
• Q-type asphere (Qcon)
• Q-type asphere (Qbfs)
• Rotationally symmetric asphere
• Asymmetric asphere
• Asymmetric general asphere
• Cylinder
• Torus
• Biconic
• ISO X-Toric
• ISO Y-Toric
• Symmetric cone

TracePro 2022 User’s Manual 2.11


Creating a Solid Model

• Asymmetric cone
• Asymmetric Zernike
• Anamorphic
• Odd Cosine
• Superconic
• Radial Spline
The Plane surface type requires no data. The Sphere surface type requires only
the radius (or curvature) of the spherical surface. The remaining surface types
require more. Each surface type is described in the sections that follow.

FIGURE 2.10 - Surfaces Tab in Insert Lens dialog

Conic
The conic surface is a conic section curve revolved to make a surface, and has
the sag

2.12 TracePro 2022 User’s Manual


Defining TracePro Solids

where c is the vertex curvature, k is the conic constant, and r is radial distance
from the axis of symmetry. The meaning of different values of the conic constant is
shown in Table 2.1.
TABLE 2.1. Conic Constant Values

K (Conic Constant) Conic Type


K < -1 hyperboloid
K = -1 paraboloid
-1 < K < 0 ellipsoid (prolate spheroid)
K=0 spheroid
K>0 oblate spheroid

Q-type asphere (Qcon)


The Q-type asphere (Qcon), developed by Greg Forbes, consists of a base conic
plus a series of radially symmetric orthogonal polynomials. The polynomials are a
function of normalized radius u, where u = r/r0, and r0 is the normalization radius.
The sag equation for a Qcon polynomial surface is

where c is the vertex curvature, k is the conic constant, and r is radial distance
from the axis of symmetry. The Qcon polynomials are best evaluated recursively.
Nevertheless, here are the first few Qcon polynomials presented explicitly:

Q-type asphere (Qbfs)


The Q-type asphere (Qbfs), developed by Greg Forbes, consists of a best-fit
sphere plus a series of radially symmetric orthogonal polynomials. The
polynomials are a function of normalized radius u, where u = r/r0, and r0 is the
normalization radius. The sag equation for a Qbfs polynomial surface is

TracePro 2022 User’s Manual 2.13


Creating a Solid Model

where c is the curvature of the best-fit sphere and r is radial distance from the axis
of symmetry. The Qbfs polynomials are best evaluated recursively. Nevertheless,
here are the first few Qbfs polynomials presented explicitly:

Rotationally symmetric asphere


The Rotationally Symmetric Asphere surface consists of a conic plus a series of
radial monomials. The sag equation is

To specify a rotationally symmetric asphere, enter the data for the base conic, the
number of terms desired, and the coefficient of each term.

Asymmetric asphere
The Asymmetric Asphere surface consists of a conic plus a series of monomials
of the form |x|j|y|k. The sag equation is

where

2.14 TracePro 2022 User’s Manual


Defining TracePro Solids

The powers j and k can be determined from i using

Asymmetric general asphere


The Asymmetric General Asphere surface consists of a conic plus a series of
monomials of the form xjyk. The sag equation is

where

The powers j and k can be determined from i using

Cylinder
The cylinder surface is a profile extruded nominally along the x axis, with profile
equal to a conic section. The cylinder is specified by its radius (or curvature) and
conic constant. The cylinder can be rotated away from the x axis using the
Gamma rotation angle in degrees.

Torus
The torus surface is a profile swept along a circle nominally lying in the x-z plane,
with profile equal to a conic section. The torus is specified by its radius (or
curvature), conic constant, and sweep radius (or curvature). The sweep circle of
the torus can be rotated away from the x-z plane using the Gamma rotation angle
in degrees.

Biconic
The biconic surface has a conic section profile in both the x and y meridians, but
generally with different radii and conic constants. In addition, series of monomials
in |x| and |y| may be added to the base biconic. The general biconic surface has
the sag equation

TracePro 2022 User’s Manual 2.15


Creating a Solid Model

where cx and cy are x and y curvatures, and kx and ky are x and y conic constants.
The biconic surface can be rotated about the z axis using the Gamma rotation
angle in degrees.

ISO X-Toric
The ISO X-Toric surface is a profile in the x-z plane swept along a circle nominally
lying in the y-z plane. The profile is a conic section plus monomial series in |x|.
The torus is specified by its radius (or curvature), conic constant, sweep radius (or
curvature), and monomial coefficients. The sweep circle of the torus can be
rotated away from the y-z plane using the Gamma rotation angle in degrees. The
sag equation of the ISO X-Toric surface is

where

and cx and cy are x and y curvatures, and kx is the x conic constant. The ISO X-
Toric surface can be rotated about the z axis using the Gamma rotation angle in
degrees.

ISO Y-Toric
The ISO Y-Toric surface is a profile in the y-z plane swept along a circle nominally
lying in the x-z plane. The profile is a conic section plus monomial series in |y|.
The torus is specified by its radius (or curvature), conic constant, sweep radius (or
curvature), and monomial coefficients. The sweep circle of the torus can be
rotated away from the x-z plane using the Gamma rotation angle in degrees. The
sag equation of the ISO Y-Toric surface is

where

and cx and cy are x and y curvatures, and ky is the y conic constant. The ISO Y-
Toric surface can be rotated about the z axis using the Gamma rotation angle in
degrees.

2.16 TracePro 2022 User’s Manual


Defining TracePro Solids

Symmetric cone
The Symmetric Cone surface is comprised of a circular cone plus a series of
radial monomials. The sag equation of the symmetric cone is

where the cone constant c = 1/tan(θ), and θ is the half-angle of the cone.

Asymmetric cone
The Asymmetric Cone surface is comprised of an elliptical cone plus series of
monomials in |x| and |y|. The sag equation of the asymmetric cone is

The asymmetric cone surface can be rotated about the z axis using the Gamma
rotation angle in degrees.

Asymmetric Zernike
The Asymmetric Zernike surface consists of a base conic plus a series of Zernike
polynomials. The sag equation of the asymmetric Zernike surface is

where the Zi are Zernike polynomials. The Zernike polynomials are separable in r
and θ and are expressed in terms of orders n and m,

The Zernike Polynomials in TracePro are ordered by n = 0,1,2,… and within each
order n, by m = -n, -n+2,… n. The highest power of r in a given polynomial is equal
to n. The number of Zernike polynomials used is controlled by setting the
maximum value of n. The Zernike polynomials are evaluated recursively.
Table 2.2 shows the numbering for the first few Zernike polynomials.
The Zernike polynomials are used with a normalized radius, r' = r/r0. The
asymmetric Zernike surface can be rotated about the z axis using the Gamma
rotation angle in degrees.
TABLE 2.2. Zernike polynomial numbering
i n m Zernike polynomial
0 0 0 1
1 1 -1 rsinθ
2 1 1 rcosθ
3 2 -2 r2sin2θ

TracePro 2022 User’s Manual 2.17


Creating a Solid Model

TABLE 2.2. Zernike polynomial numbering


i n m Zernike polynomial
4 2 0 2r2-1
5 2 2 r2cos2θ

Anamorphic
The Anamorphic surface type is similar to the biconic surface type, but with a
different series of extra terms. The sag of the anamorphic surface type is

where cx and cy are x and y curvatures, and kx and ky are x and y conic constants.
The anamorphic surface can be rotated about the z axis using the Gamma
rotation angle in degrees.

Odd Cosine
The Odd Cosine surface type consists of a base conic plus a series of radial
monomials, plus a series of radial-times-cosine terms with settable radial
exponent, amplitude, frequency, and phase. The sag of the odd cosine surface is

where u = r/r0 is normalized radius, r0 is the normalization radius, c is the vertex


curvature, k is the conic constant, and r is radial distance from the axis of
symmetry. The odd cosine surface can be rotated about the z axis using the
Gamma rotation angle in degrees.

Superconic
The superconic surface type is defined in terms of the radius from the vertex to a
point on the surface rather than a cylindrical radius. The superconic is defined by
the equation

2.18 TracePro 2022 User’s Manual


Defining TracePro Solids

where

and c is the vertex curvature and k is the conic constant. These coefficients plus
A, B, C, Ui and Vi are used to define a superconic surface.

Radial Spline
A Radial Spline surface is a cubic spline curve along a meridian that is revolved to
create a surface. The curve is created by specifying slope values of the curve at
different radii along the meridian. The sag of the surface between points i-1 and i
is determined by

where hi is the height along the meridian at point i, si is the slope, and ci is the
curvature. The curvature and sag values at each point are determined from the
recursion relations

Aperture tab
Using the Aperture tab (see Figure 2.11) you set:
1. Aperture shape: defines the cross-sectional shape of the lens orthogonal to
the axis. It can be Circle, Rectangle, Ellipse, Rounded Rectangle, or Polygon;
2. Aperture semi-diameters: the radii of the lens aperture in the X and Y
directions in the model units. Note that the Y dimension is not allowed for a
circle shape;
3. Aperture Decenters: the decenter of the lens in the X and Y directions in the
model units;
4. Corner Radius: applies when a Rounded Rectangle aperture shape is
selected;
5. Aperture gamma: the orientation of the lens aperture with respect to the optical
axis, with X denoting the local horizontal axis and Y the local vertical axis. The
value, either in Degrees or in Radians denotes the rotation of the lens aperture
around the local Z (i.e., optical) axis; and

TracePro 2022 User’s Manual 2.19


Creating a Solid Model

6. Aperture second surface semi-diameter: allows for the second surface of a


single lens to have a different semi-diameter than that of the first surface.
Prescriptions from lens design codes (e.g., OSLO) often have this situation;
therefore, the inclusion of this additional parameter ensures there is no loss of
aperture data when clicking on the Modify Lens button;
7. X Point and Y Point: allows entry of polygon vertices when Polygon aperture
shape is chosen.

FIGURE 2.11 - Insert Lens Element dialog box: Aperture tab

Obstruction tab
The obstruction used by TracePro refers to an opening or hole in the lens. To truly
obscure a portion of the lens, insert a thin block or cylinder with an opaque
Surface Property. Using the Obstruction tab (see Figure 2.12)you set:
1. Obstruction shape: options are None, Circle, Rectangle, Ellipse, Rounded
Rectangle, and Polygon;
2. Obstruction semi-diameters: the radii or half-widths of the obstruction in the
local X and Y directions in the model units;
3. Obstruction decenters: the decenters from the local optical axis of the
obstruction in the local X an Y directions in the model units;
4. Corner Radius: specifies the radius of corners for the Rounded rectangel
shape;

2.20 TracePro 2022 User’s Manual


Defining TracePro Solids

5. Obstruction gamma: the orientation of the obstruction with respect to the


optical axis, with X denoting the local horizontal axis and Y the local vertical
axis. The value, either in Degrees or in Radians denotes the rotation of the
obstruction around the local Z (i.e., optical) axis; and
6. X Point and Y Point pairs: allow entry of polygon vertices of teh obstruction
when Polygon shape is selected.

FIGURE 2.12 - Insert Lens Element dialog box: Obstruction tab with
Rectangle obstruction selected.

Position tab
Using the Position tab (see Figure 2.13) you set:
1. The X, Y, Z coordinates of the vertex of the first surface of the element, in
global coordinates;
2. The X, Y, Z rotation angles (tilt) of the first surface or entire element;
3. The X, Y, Z decenters of the second surface with respect to the first suface
(i.e., these are local offsets with respect to item (1) above); and
4. The X, Y, A rotation angles (tilt) of the second surface of the element with
respect to the first surface (i.e., these are local offsets with respect to item (2)
above).
If you enter rotation angles, the surface/element is first rotated about the x-axis,
then about the y-axis, and finally about the z-axis. Note that the first two rows in

TracePro 2022 User’s Manual 2.21


Creating a Solid Model

this dialog box are in global coordinates, while the last two rows are in local
coordinates with respect to the first two rows. If the latter two rows have no
offsets, then the offsets are as globally indicated for the first surface Center and
Tilt.

FIGURE 2.13 - Insert Lens Element dialog box: Position tab

Fresnel Lens
The Geometry|Fresnel Lens menu item opens a modeless dialog box that
allows you to specify a Fresnel lens based on the material and the object and
image distances. The dialog box allows you to enter:
1. Ring width or lines/unit length
2. Thickness of the substrate
3. Radius of the lens substrate
4. Material catalog, name, and design wavelength
5. Object distance
6. Image distance
7. Origin or location of the center of the part
8. Rotation angles specifying the orientation

2.22 TracePro 2022 User’s Manual


Defining TracePro Solids

TracePro interprets an object or image distance equal to zero as an infinite


distance. Negative distances can also be entered for the case of a virtual object
and/or image.

The Fresnel grooves are


on the back surface of the
element as drawn.

FIGURE 2.14 - Insert Fresnel Lens dialog box and resulting Fresnel Lens

The ring width specifies the width of the individual rings in the Fresnel lens, while
the lines/unit length specifies the inverse of the ring width: the number of rings per
unit length (e.g. 50 lines/inch). You can specify either one of these quantities, and
the other will be updated.
The object and image distances specify point-to-point imaging. After entering all
the data for the Fresnel lens, TracePro will build a Fresnel lens with conical facets
that provide the requested imaging. The facet angles will be chosen so that light
from a point on the left side of the lens at a distance equal to the object distance is
imaged optimally into a point at a distance equal to the image distance on the right
side of the lens, for the selected material and wavelength.
The formula for calculating the facet angles on the Fresnel lens is

sin  1 + sin  2
tan  = --------------------------------------------------------- , (2.1)
2 2
 n – sin  1  – cos  2

TracePro 2022 User’s Manual 2.23


Creating a Solid Model

where 1 is the incident angle of light on the Fresnel lens, 2 is the angle of light
leaving the Fresnel lens, n is the index of refraction of the material, and  is the
facet angle. This formula produces an optimized or “aspheric” Fresnel lens, and
is not equivalent to collapsing segments of a sphere onto a flat substrate.

Reflector
The Geometry|Reflector menu or Insert Reflector toolbar button opens a
modeless dialog box that allows you to specify a reflector such as for a lamp or
concentrator. The Insert Reflector dialog is a tabbed dialog box with six tabs for
entering six different classes of reflectors and concentrators:
• Conic
• 3D Compound
• Trough (Cylinder)
• Compound Trough
• Rectangular Concentrator
• Facetted Rim Ray
A reflector consists of a curved piece of material with the thickness and shape
specified in the dialog box. The sections below describe each class of reflector.

Conic
A conic reflector is a conic section of revolution, i.e., one of the following:
• Spherical
• Parabolic
• Elliptical
• Hyperbolic

2.24 TracePro 2022 User’s Manual


Defining TracePro Solids

FIGURE 2.15 - Elliptical reflector with a hole at (0,0,0)

This dialog box allows you to specify the basic shape of the reflector (one of the
above choices) as well as the focal length(s) or radius, as appropriate. You also
specify the thickness, radius of a hole at the vertex, and the location and
orientation of the reflector. A reflector specified with no rotation will be created in
the orientation shown in Figure 2.15, with its axis of symmetry parallel to the z-
axis, and the open end facing along the +z-axis.
Figure 2.15 shows an elliptical reflector with a hole at the vertex and located at the
origin. The X, Y and Z coordinates of the origin serve to locate the vertex of the
reflector. If you do not need a hole at the vertex, leave the hole radius set to zero.

TracePro 2022 User’s Manual 2.25


Creating a Solid Model

FIGURE 2.16 - Insert Conic Reflector Dialog

The parameters necessary to specify a conic reflector are:


• Shape (e.g. circular, elliptical, etc.)
• Length (the distance from the vertex to the end of the reflector)
• Diameter
• Radius of curvature (spherical)
• Focal length(s) (non spherical)
• Thickness
• Hole radius (radius of an optional hole at the vertex)
• Origin (X, Y, Z coordinates of the vertex)
• Rotation (X, Y, Z rotation angles about the vertex)
The length, diameter and radius/focal length(s) are related and you can select one
value to be calculated using the Calculate drop down list and enter the others. For
example, if you need a parabolic reflector to fit inside a known volume you can
enter the length and diameter. Similarly, if you know the diameter and focal length
you can calculate the length.

2.26 TracePro 2022 User’s Manual


Defining TracePro Solids

3D Compound
A 3D Compound reflector is a 3D compound concentrator. You can use this tab to
make a:
• CPC (Compound Parabolic Concentrator),
• CEC (Compound Elliptical Concentrator)
This dialog tab actually allows you to make toroids formed by revolving parabolas
and ellipses, special cases of which are CPCs and CECs. You enter the axis tilt,
lateral shift, and length of the concentrator independently, so that you can create
shapes other than ideal CPCs and CECs. To create ideal CPCs and CECs, you
must solve for one of these parameters in terms of the others yourself, then enter
the result in the dialog.
You can choose to make a solid or hollow concentrator by choosing the shape
from the list in the dialog box.
The parameters necessary to specify a 3D Compound Reflector are:
• Shape (Hollow or Solid) and (Elliptical or Parabolic)
• Front length (the distance from the focal point to the entrance port end of the
concentrator)
• Back length (the distance from the focal point to the exit port end of the con-
centrator)
• Lateral focal shift (equal to the exit port radius for a textbook concentrator)
• Thickness
• Axis tilt (equal to the acceptance angle for a textbook concentrator)
• Focal length(s)
• Origin (X, Y, Z coordinates of the center of the exit port)
• Rotation (X, Y, Z rotation angles about the center of the exit port)
Note: A Conic Reflector is a special case of a 3D Compound Reflector. You could
make a Conic Reflector by setting the Axis tilt and the Lateral focal shift to zero in
the 3D Compound Reflector dialog tab.
For more information on concentrators, see the textbook: High Collection
Nonimaging Optics, W.T. Welford and R. Winston, Academic Press, New York,
1989, ISBN 0-12-742885-2.

Parabolic Concentrators
A Compound Parabolic Concentrator (CPC) can be thought of as a parabolic
toroid, i.e. a parabola revolved about an axis other than its axis of symmetry. A
parabolic concentrator can be constructed by starting with a parabola, tilting it
(about its focal point), displacing it laterally, then revolving it about its original axis
of symmetry to form a surface.
A CPC is the best theoretical shape for concentration of light from a distant source
when the parameters are chosen as described in Welford and Winston. TracePro
also allows you to enter a CPC that is not an optimal concentrator surface.
In TracePro, the shape of a CPC is described by the Front length, the Back length,
the Lateral focal shift, and the Axis tilt of the surface. The Origin and Rotation
angles serve to locate and orient the CPC axis. The Back length allows you to

TracePro 2022 User’s Manual 2.27


Creating a Solid Model

further depart from the textbook CPC. A textbook CPC has a Back length equal to
zero. Increasing the Back Length grows the CPC lengthwise at the exit port end,
while decreasing it makes the overall length shorter, this is called a truncated
CPC. Both the Front length and the Back length are measured from the focal point
of the parabola to either end of the CPC.
The parameters described are shown in Figure 2.17:

FIGURE 2.17 - Compound Parabolic Concentrator

The Origin is represented by the (X, Y, Z) coordinates, L is the Front length, i is


the angle Axis tilt, and 0 is the Lateral focal shift.
To make a textbook, or optimal CPC, you can pick the acceptance angle (equal to
the axis tilt angle) and the exit port radius, then solve for the focal length and the
overall length of the concentrator. The focal length f is found from

f = a  1 + sin  i  , (2.2)

where a is the exit port radius and i is the acceptance angle, and the overall
length L is found from

a  1 + sin  i  cos  i f cos 


- = ---------------i ,
L = ------------------------------------------- (2.3)
2 2
sin  i sin  i
You could also choose any two of these four parameters and solve for the other
two using these two equations.
To enter this optimal CPC into TracePro, you would set the Front length equal to
L, the Back length equal to zero, the Axis tilt equal to i, and the Lateral focal shift
equal to a. The lateral focal shift is equal to the radius of the exit aperture. For a
solid CPC, the acceptance angle i' is increased by the index of refraction n, i.e.

2.28 TracePro 2022 User’s Manual


Defining TracePro Solids

sin(i') = n*sin(i). See Welford and Winston for further discussion on 3D


compound concentrators.
If you enter rotation angles, the concentrator is first rotated about the x-axis, then
about the y-axis, and finally about the z-axis.

Trough (Cylinder)
A trough or cylinder reflector is a conic section that has been extruded to form a
reflector that is uniform in cross-section and generally cylindrical in shape. Trough
shapes that can be defined in TracePro are:
• Circular cylinder (an ordinary cylinder)
• Parabolic cylinder
• Elliptical cylinder
• Hyperbolic cylinder
A trough reflector can also have an optional slit along the length, at the vertex of
the trough. To include more complex hole structure(s) in this and other reflector
types, use the Boolean operations with bounding objects. Note that these Boolean
operations will preclude the use of the Modify button on this menu because the
object will no longer be seen a Reflector Object.

FIGURE 2.18 - Elliptical Trough with Slit

The parameters necessary to specify a trough reflector are:


• Shape (Circular, Elliptical, Parabolic, or Hyperbolic)
• Length (the length along the cylinder axis)
• Thickness
• Depth (distance from the vertex to the outer edge of the reflector)
• Slit width
• Slit length

TracePro 2022 User’s Manual 2.29


Creating a Solid Model

• Focal length(s) (or radius for a circular reflector)


• Origin (X, Y, Z coordinates of the vertex)
• Rotation (X, Y, Z rotation angles about the vertex)

Compound Trough
A compound trough reflector is similar to a 3D compound reflector, except that the
compound shape is extruded to form a trough instead of being revolved. The
discussion for the 3D compound reflectors holds here, except that you must also
specify the length of the trough (along the extrusion axis).

FIGURE 2.19 - Compound Trough Reflector

The parameters necessary to specify a Compound Trough Reflector are:


• Shape (Hollow or Solid) and (Elliptical or Parabolic)
• Front depth (the distance from the focal points to the entrance port end of the
concentrator)
• Back depth (the distance from the focal points to the exit port end of the con-
centrator)
• Lateral focal shift (equal to the exit port radius for a textbook concentrator)
• Thickness
• Length (along the extrusion axis)
• Axis tilt (equal to the acceptance angle for a textbook concentrator)
• Focal length(s)
• Origin (X, Y, Z coordinates of the center of the exit port)
• Rotation (X, Y, Z rotation angles about the center of the exit port)

2.30 TracePro 2022 User’s Manual


Defining TracePro Solids

Rectangular Concentrator
A rectangular concentrator is comprised of two Compound Trough reflectors
oriented at right angles to one another. This produces a concentrator that is a
compound conic in either the x-z or y-z cross section, and is rectangular in any x-
y cross section. In the Rectangular Concentrator dialog tab, there are inputs for
two compound conics as well as the normal reflector parameters that are needed.

FIGURE 2.20 - Rectangular Concentrator Reflector

The parameters necessary to specify a Rectangular Concentrator Reflector are:


• Shape (Hollow or Solid) and (Elliptical or Parabolic)
• Front depth (the distance from the focal points to the entrance port end of the
concentrator)
• Back depth (the distance from the focal points to the exit port end of the con-
centrator)
• Lateral focal shifts in X and Y (equal to the exit port radii for a textbook concen-
trator)
• Thickness
• Axis tilts in X and Y (equal to the acceptance angles for a textbook concentra-
tor)
• Focal length(s) in X and Y
• Origin (X, Y, Z coordinates of the center of the exit port)
• Rotation (X, Y, Z rotation angles about the center of the exit port)

Facetted Rim Ray


Facetted reflectors are often used to produce a uniform irradiance distribution for
an extended source. The facets provide smoothing of the reflector’s output by
perturbing the imaging qualities of the object. The Facetted Rim Ray in TracePro
is an optimized reflector for a given source, package (or enclosure), and

TracePro 2022 User’s Manual 2.31


Creating a Solid Model

irradiance plane. The package is defined by the dimension of the desired object
enclosing the reflector.
To specify the reflector, start by locating the package Height, Yp, and Depth
Position (Location), Zp, as shown in Figure 2.21. Enter the size of the source,
Source Height, and distance from the vertex of the reflector, Source Location.
Next enter the desired output dimensions, Target Height and Location. TracePro
will trace a ray from the top of the source to the package position (Yp,Zp), to the
top of the target. The law of reflection will be used to determine the angle of the
facet edge. TracePro will then extend the facet edge so a ray can be traced from
the bottom of the source, to the bottom of the facet edge, to the bottom of the
target. This defines the first facet edge. Additional facet edges will be defined until
the reflector vertex is crossed. The profile will be revolved in steps based on the
#Facets/Row to create the solid reflector.

FIGURE 2.21 - Left: top and bottom rim rays traced for a single facet edge;
Right: package and facet edges

Note: The rays shown in Figure 2.21 are used to define the edge of the first facet.
The edge is then swept to create the first facet, and swept repeatedly to create all
facets. Therefore, for a Circular Rim Ray Reflector, a ray traced to the final
reflector will not produce the raytrace shown in Figure 2.21 as it is used for
construction only.
The parameters necessary to specify a Facetted Rim Ray Reflector are:
• Thickness
• # Facets/Row (this is the number of facets created when the profile is sweep
about the Z axis, for a circular reflector)
• Length (for a Trough reflector)
• Height (semi height of the package)
• Location (Z distance from the reflector vertex defining the depth of the pack-
age)
• Source Height (semi diameter of the source extent along the Y axis)
• Source Location (origin of the source as a Z distance from the reflector vertex)
• Target Height (semi diameter of the target extent along the Y axis)
• Target Location (origin of the target as a Z distance from the reflector vertex)
• Origin (X, Y, Z coordinates of the reflector’s vertex)
• Rotation (X, Y, Z rotation angles about the reflector’s vertex)

2.32 TracePro 2022 User’s Manual


Defining TracePro Solids

Tube
The Geometry|Tube menu or Insert Tube toolbar button opens a modeless dialog
box that allows you to specify a tube such as might be used for a lens barrel or
sunshade. You can create a tube with either a elliptical or rectangular cross-
sectional shape. Cylindrical tubes have the same width or radius at each end of
the tube, while conical tubes have different widths or radii at the two ends.
Rectangular tubes can have different width and height dimensions at the two ends
forming a Tapered Rectangular tube.
Using the Tube dialog you set:
• Wall thickness
• Length of the tube
• Cross-sectional shape, either elliptical or rectangular
• Inside radius of the base and top of an elliptical tube
• X half width and Y half width of a rectangular tube.
• Position of the base of the tube
• Rotation angles of the axis of the tube
• If the Base or Top is closed
If you enter rotation angles, the tube is first tilted about the x-axis, then about the
y-axis, and finally about the z-axis. An unrotated tube has its axis along the z-axis
The Tube dialog box is a modeless dialog box, so you can leave it open while you
do other things like inserting other solid objects, moving objects, changing the
view, or applying properties.
.

FIGURE 2.22 - Elliptical Tube

Baffle Vane
A baffle vane is usually made from a flat or conical sheet of metal in which a hole
is cut, as shown in Figure 2.23. The edge of the hole normally comes to a point on

TracePro 2022 User’s Manual 2.33


Creating a Solid Model

one side (i.e., like a chisel) to reduce scattering from the edge. However, the edge
is never perfectly sharp due to manufacturing realities. The finite radius of the
knife edge is modeled by a rounded cross-section or fillet, where this shape within
TracePro is developed from a section of a torus. The outer edge of the baffle vane
is cylindrical to be placed inside a cylindrical tube or lens barrel. Figure 2.23
shows a cross-sectional view of a baffle vane located with position (0,0,0) and
rotation (0,0,0)
.

FIGURE 2.23 - Baffle Vane

Select Geometry|Baffle Vane or press the Baffle Vane toolbar button to open
the Baffle Vane dialog. All of the dimensions necessary to specify a baffle vane
are displayed:
• Aperture Radius - the radius of the hole in the baffle vane.
• Tube Radius - the outer radius of the vane. You should set this equal to the
radius of the tube in which the vane fits.
• Thickness - the thickness of the sheet metal used to make the baffle vane.
• Knife Radius - the finite radius of the cross-section of the knife edge.
• Conical Angle - the half-angle of the cone from which the baffle vane is cut -
equal to zero for a flat baffle vane.
• Relative Ground Angle - the angle at which the knife edge is sharpened rela-
tive to the surface of the sheet metal.
• Position - (X, Y, Z) coordinates of the center of the baffle vane aperture.
• Rotation - with no rotation, the axis of symmetry of the baffle vane is along the
z-axis.

2.34 TracePro 2022 User’s Manual


Boolean Operations

If you enter rotation angles, the baffle vane is first rotated about the x-axis, then
about the y-axis, and finally about the z-axis.
The Baffle Vane dialog box is a modeless dialog box, so you can leave it open
while you do other things like inserting other solid objects, moving objects,
changing the view, or applying properties.

Boolean Operations
A common way to manipulate solid objects in a solid modeling program is to use
Boolean operations. Boolean operations let you create complicated shapes from
simple shapes. Boolean operations can also change the properties of an object.
Therefore, they require care and planning in their use.
All three of the Boolean operators (Intersect, Subtract and Union) used in
TracePro take two or more selections or operands, like arithmetic operators. The
first selection represents the material and the second represents the tool. For
example, to “drill” a hole in a block, you could position a cylinder inside a block,
select the block and then the cylinder and then select Edit|Boolean|Subtract.
The block would have a hole where the cylinder was subtracted from the block. In
TracePro you can perform several operations on one object by selecting a first
object for the material and several additional objects as tools, using a Shift (or
Ctrl) Select selection. When selecting the tools, hold down the Shift (or Ctrl) key
when pressing the left mouse button.

FIGURE 2.24 - Boolean Operations: Two Spheres, Intersection of Two


Spheres, Subtraction of Two Spheres, and Union of Two Spheres

Perform Boolean operations before you assign property values (Material


Properties, Surface Properties, and Source Properties).
Note: when you perform a Boolean operation, the choice of existing properties to
apply to the resulting object is often ambiguous. TracePro may delete some
properties during a Boolean operation.

TracePro 2022 User’s Manual 2.35


Creating a Solid Model

Intersect
The Intersect operator takes two or more objects and produces the overlapping
volume of the solid objects. If the objects do not overlap, the result of the
intersection is to delete the objects.
For example, you can create a biconvex lens element by creating two spheres
that overlap a small amount, then use the Intersect operator to create the
intersection of the two spheres. Since the space that is inside both spheres is in
the shape of a biconvex lens, the result of the Intersect operation is to produce a
lens.
To use the Intersect operator select two or more objects, you must do a multiple
selection in TracePro using the Shift or the Ctrl Key. For example, to intersect four
objects:
1. Select Edit|Select|Object or click the Select Object toolbar button.
2. Select the first object. You may click on the object in the model window or use
the system tree.
3. Press and hold the Shift (or Ctrl) key and select the second, third and fourth
objects.
4. Press Edit|Boolean|Intersect or click on the Intersect toolbar button to
complete the intersection operation.
5. The resulting object is the overlapping volume of all four objects.
Note: when you perform a Boolean operation, the choice of existing properties to
apply to the resulting object is often ambiguous. TracePro may delete some
properties during a Boolean operation.

Subtract
The Subtract operator takes two or more objects and subtracts the overlapping
volume of each secondary object from the first object. If none of the secondary
objects overlaps the first object, nothing happens. If any objects completely
enclose the first object, the result of the subtraction is to delete all the objects.
Note: The result of Boolean Subtraction is highly dependant on the order in which
the objects are selected.
For example, if you wish to subtract objects B, C, D, and E from object A, you can
do this by first selecting objects A, B, C, D and E in a multiple selection, then
select the Subtract operator to complete the operation. The result is
result = A - B - C - D - E
You can create a mirror with a hole in the center by first creating a mirror, then a
cylinder that protrudes through the center of the mirror. Then use the subtract
operator to subtract the cylinder from the mirror and thereby create the hole. An
analogy with a machining operation helps: think of the first object as a part and the
second object as a tool. The subtraction operation is like the tool cutting the part.
To use the Subtract operator select two or more objects, you must do a multiple
selection in TracePro using the Shift or the Ctrl Key. For example, to subtract
three subsequent objects from a “base” object:
1. Select Edit|Select|Object or click the Select Object toolbar button.
2. Select the first object. You may click on the object in the model window or use
the system tree.

2.36 TracePro 2022 User’s Manual


Moving, Rotating, and Scaling Objects

3. Press and hold the Shift (or Ctrl) key and select the second, third and fourth
objects.
4. Press Edit|Boolean|Subtract or click on the Subtract toolbar button to
complete the intersection operation.
5. The resulting object will be the successive subtraction of each of the other
three objects from the first object.
Note: when you perform a Boolean operation, the choice of existing properties to
apply to the resulting object is often ambiguous. TracePro may delete some
properties during a Boolean operation.

Unite
The Unite operator takes two or more objects and unites the total volume of the
objects to form one single object. If the objects do not overlap, they are still united,
in effect tied together. If one object completely encloses another, the result of the
unite operation is to effectively delete the smaller object.
You can create a lollipop shape by creating a sphere and a narrow cylinder (a rod)
that sticks into the sphere. Then use the unite operator to unite the sphere and the
cylinder. After the operation, one object remains which is in the shape of a
lollipop.
You can also use the unite operator to attach a baffle vane to a tube. Select
Edit|Select|Object or press the Select Object toolbar button, select the tube,
shift+select the baffle vane, and then select Edit|Boolean|Unite or press the
Unite toolbar button. Remember that once the vane is united with the tube, there
is no way to unattach it, unless you do it right away using Edit|Undo.
To use the Unite operator select two or more objects, you must do a multiple
selection in TracePro using the Shift or the Ctrl Key. For example, to unite four
objects:
1. Select Edit|Select|Object or click the Select Object toolbar button.
2. Select the first object. You may click on the object in the model window or use
the system tree.
3. Press and hold the Shift (or Ctrl) key and select the second, third and fourth
objects.
4. Press Edit|Boolean|Unite or click on the Unite toolbar button to complete
the intersection operation.
5. The resulting object is the total volume of all four objects.
Note: when you perform a Boolean operation, the choice of existing properties to
apply to the resulting object is often ambiguous. TracePro may delete some
properties during a Boolean operation.

Moving, Rotating, and Scaling Objects


You can move, rotate, and scale an object or group of objects using the
Edit|Object|Translate, Edit|Object|Move, Edit|Object|Rotate, and
Edit|Object|Scale menu items, respectively. Any number of objects can be
manipulated as a group. Simply select an object or objects with the mouse, then
select the desired menu item. To select an object, click on it with the mouse. To
select additional objects, hold down the Ctrl Key and click on them with the

TracePro 2022 User’s Manual 2.37


Creating a Solid Model

mouse, or use the selection tool in rubberband mode to enclose a group of objects
in the rubberband rectangle.
All of the dialog boxes are modeless, so you can leave them open to select new
objects for moving, rotating, scaling, or to perform other operations. You can
rotate, move, or scale object(s) in small increments by leaving the dialog box
open, setting the parameters to small values, and repeatedly pressing Apply.
For an example using Move and Rotate to create arrays of objects see the
example “Using Copy with Move/Rotate” on page 9.38.

Translate
To move a group of one or more objects interactively, select the objects with the
mouse, then select Edit|Object|Translate or click on the Translate toolbar
button. Using the mouse, press the left mouse button and drag the selection to a
new location. Translate moves the object(s) along the plane of the screen,
keeping the current depth coordinate - whatever it happens to be in 3D space.
The Translate tool will be active until a new tool is selected.

Translate Copy
You can copy the selection by pressing the Ctrl key during the mouse dragging.
When the left mouse button is released, new objects will be made from the
selected objects and placed at the translated position.

Move
To move a group of one or more objects, select the objects with the mouse, then
select Edit|Object|Move to open the Move Selection dialog box. The dialog box
contains buttons to choose either Relative, Absolute or Distance along with X, Y,
and Z values. You can use the Relative option to move the object relative to its
own center, while the Absolute option places the object at the given global
coordinates. For example, to move a selected object by 2 units along the z-axis,
use Relative movement and set the values as follows:
X Center 0
Y Center 0
Z Center 2
Then press Apply, and the objects move by 2 along the z-axis.
When you select the Absolute option, the dialog will be updated to show the
current location of the first object in the selection.
You can also move the selection a desired distance along a vector by selecting
the Distance option, with a direction in (X,Y,Z) and distance entered in model
units. This is similar to the relative move such that the distance is relative to the
objects original position.

2.38 TracePro 2022 User’s Manual


Moving, Rotating, and Scaling Objects

FIGURE 2.25 - Move dialog with the distance option selected

When more than one object is selected, the first object selected is moved to the
location specified, while the other objects maintain their position relative to the first
object.

Move Copy
Move Copy allows you to make a copy of an object and move it in one operation.
This is much more convenient than manually copying the object, where the copied
object is superimposed over the original. Move Copy is also a powerful tool for
creating arrays of objects, using Move Copy Relative. This is because Move Copy
makes a copy of the selected object(s), then moves the original to the coordinates
specified. Once you have the X, Y, Z values defined and the object selected, you
can repeatedly press the Copy button to make a row of objects, one for each
button press. Once the row is completed, you can make an array by selecting the
whole row of objects, then pressing Copy again, but with a different direction
entered for the X, Y, Z values.
Note: If you apply surface and material properties before you do the Move Copy,
the properties will be copied as well, saving you some effort later on.

Rotate
To rotate a group of one or more objects, select the objects with the mouse, then
select Edit|Object|Rotate to open the Rotate Object dialog box. The dialog box
contains a rotation angle, an axis about which to rotate and X, Y and Z values to
specify a rotation point. A text box allows you to enter a number specifying the
angle of rotation. Next to it is a button that enables you to specify whether the
units for that angle are in degrees or radians. Rotations follow the right-hand rule.
The default units for rotations are degrees. If you prefer to use radians, press the
button labeled in Degrees and it changes to in Radians. The rotation angle will be
applied in radians.
Once you have entered the rotation angle, axis for rotation, and the rotation point,
press Apply, and the selections are rotated.

TracePro 2022 User’s Manual 2.39


Creating a Solid Model

Axis and Center of Rotation

FIGURE 2.26 - Rotate Object Dialog Box

The Axis combo box has 7 choices to select the axis about which the rotation will
take place:

About X This is the global x-axis, the vector (1.0, 0.0, 0.0)
About Y This is the global y-axis, the vector (0.0, 1.0, 0.0)
About Z This is the global z-axis, the vector (0.0, 0.0, 1.0)
About Object X This is the object's local x-axis, the vector (1.0, 0.0, 0.0)
Use View|Display Object WCS
About Object Y This is the object's local y-axis, the vector (0.0, 1.0, 0.0) 
Use View|Display Object WCS
About Object Z This is the object's local z-axis, the vector (0.0, 0.0, 1.0) 
Use View|Display Object WCS
Customize This allows any vector in global coordinates to be used for the
axis of rotation

The first 3 choices are rotations about the Global axis. The next 3 choices are
rotations about the object's WCS axis. If more than one object is selected the first
object in the selection is used. If Customize is selected, you can specify an
arbitrary axis by input X Direction, Y Direction, and Z Direction. Every time you
make a selection in the axis combo box the selected axis information is updated in
X Direction, Y Direction, and Z Direction edit boxes.
You can either enter the center point or check Origin of Object WCS which means
using the origin of the first selected object's WCS as the center point. At the time
you check Origin of Object WCS the origin coordinates of the first selected object
are displayed in X Center, Y Center, and Z Center edit boxes. If you wish to use
global coordinates, enter numbers specifying the rotation center point. This will be
the point around which the selected object will rotate after you click the Apply
button in the dialog box.

2.40 TracePro 2022 User’s Manual


Moving, Rotating, and Scaling Objects

Rotate Copy
Rotate Copy allows you to make a copy of an object and rotate it in one operation.
This is much more convenient than manually copying the object, where the copied
object gets superimposed on top of the original. Rotate Copy is also a powerful
tool for creating arrays of objects. This is because Rotate Copy makes a copy of
the selected object(s), then rotates the original by the values specified. Once you
have the rotation values defined and the object(s) selected, you can repeatedly
press the Copy button to make a curved row of objects, one object for each button
press.
Note: If you apply surface and material properties before you do the Rotate Copy,
the properties are copied, saving you some effort later on.

Scale
To scale a group of one or more objects, select the objects with the mouse, then
select Edit|Object|Scale to open the Scale Selection dialog box. The dialog
box contains a scale factor to specify the magnitude of the scaling. A scale factor
greater than one enlarges the selection, while a scale factor less than one makes
the object(s) smaller.
All scaling is done relative to the object's origin, so all points within an object
(other than the origin) appear to shift when a scaling operation occurs. You can
also scale the selection's position by checking the scale position box. This is
useful for scaling groups of objects that must fit together.

FIGURE 2.27 - Scale Selection Dialog Box

Scaling can be Uniform with X, Y, and Z directions having the same scaling factor,
or Non-Uniform using different scaling factors. For example, you can scale a
sphere into an ellipsoid by setting one scale factor to be different from the other
two.
The non-uniform scaling option includes Local WCS and Global WCS selections.
The scaling is performed in the three directions but can be made relative to the
global coordinate system or to the object's coordinate system.
Once you have typed in the scale factor, press Apply, and the objects will be
scaled.
Figure 2.28 shows the result of non-uniform scaling using Local and Global
options. Two square blocks were created with a 45 degree rotation about the x-

TracePro 2022 User’s Manual 2.41


Creating a Solid Model

axis and scaled with a Y Scale Factor of 2. The left block was scaled to the Global
WCS and the Right was scaled to the block's Local WCS.

FIGURE 2.28 - Two blocks after non-uniform scaling

Scale Copy
Scale Copy allows you to make a copy of an object and scale it in one operation.
This is much more convenient than manually copying the object, where the copied
object will be superimposed on top of the original. Scale Copy is also a powerful
tool for creating arrays of concentric or tapered objects. This is because Scale
Copy makes a copy of the selected object(s), then scales the original relative to
the origin by the specified scale factor. Once you have the scale factor defined
and the object(s) selected, you can repeatedly press the Copy button to make a
concentric set of objects (if the object is centered on the origin) or a tapered set of
objects (if the original is not centered on the origin).
Note: If you apply surface and material properties before you do the Scale Copy,
the properties will be copied as well, saving you some effort later on.

Orientation
Select Edit|Object|Orientation to display the position and Euler angle
rotations of a selected object. The data is referenced from the object's
Transformation Matrix. The Center Position column displays the center of the
object in the current model units, while the Euler column displays the Euler
rotations of the object. Rotations are performed in TracePro first about X, and then
about Y and finally about Z. The Object’s Orientation can be modified by entering
a new position and/or Euler angles and pressing the Apply button.

Sweeping and Revolving Surfaces


Using the Edit|Surface menu selection, you can sweep and revolve surfaces in
TracePro. Sweeping and revolving are ways of extending surfaces to create new
shapes of objects. For example, if you create a solid cylinder, you can lengthen it
by selecting one of the planar end surfaces, and using Edit|Surface|Sweep to

2.42 TracePro 2022 User’s Manual


Sweeping and Revolving Surfaces

sweep it along the axis of the cylinder. You can make a corner on the end of the
cylinder by sweeping the end face in a different direction. You can make a conical
extension on the end of the cylinder by sweeping with a draft angle. Finally, you
can make a bend on the end of the cylinder by revolving the end face.

Sweep
To sweep a surface:
1. Select the surface you wish to sweep by clicking on it with your mouse or
selecting it in the system tree.
2. Select Edit|Surface|Sweep to open the Sweep Surface Selection dialog box.
3. Type in the Distance and Draft angle.
4. Now you must choose to sweep along the surface normal or manually enter a
sweep direction using X, Y, and Z vectors.
5. Finally, press Apply to sweep the surface.
An example of the Sweep command is located in “Sweep Surface Example” on
page 9.33.

Revolve
You can revolve a surface using the Revolve Surface Selection dialog box by
selecting Edit|Surface|Revolve. Revolve is restricted to planar surfaces.

Original Surface Position

Plane of Surface

Axis of rotation
Radius
Angle

FIGURE 2.29 - Surface Revolve parameters.

To revolve a surface:
1. Select a planar surface

TracePro 2022 User’s Manual 2.43


Creating a Solid Model

2. Select Edit|Surface|Revolve to open the Revolve Surface Selection dialog


box.
3. Enter the Angle, Draft angle, Radius, and Steps.
4. Enter the axis direction data.
5. Choose a point about which to rotate. You can either: a) Type in the x,y,z
values of the point directly, b) click a position in the Model Window and then
click Get Position from last mouse click, or c) click Calculate a Position using
selected surface. Option c will choose a point that is coplanar with the surface
and one "radius" away from the center of the surface. The direction of the point
is determined by the right-hand rule, i.e. it is along the direction of the cross
product of the rotation axis with the surface normal.
6. Click Apply to revolve the surface. TracePro calculates the point about which
the face will be revolved and displays it as the Position in a “grayed-out”
display. The values in the dialog box have the following meanings.
Angle Angle through which the surface will be revolved.
Draft Angle Angle by which the revolved surface will be tapered.
Radius Radius from the center of the surface to the axis of
rotation.
Steps =0: creates a continuous bend
>0: creates a stepwise bend (a sequence of N+1 mitered
sweeps)
An example of the Sweep command is located in “Revolve Surface Example” on
page 9.36.

Notes Editor
The Notes Editor provides a text window to store information with a TracePro
Model like a notebook where the comments are stored in the OML file. The editor
includes common text formatting functions to highlight points, make lists and
change text colors. All data is saved in Rich Text Format (RTF) to retain text
formatting.

Open the Notes Editor with Edit|Notes or use the Notes Toolbar icon, .

Figure 2 Notes Editor

The editor toolbar includes the following commands:

2.44 TracePro 2022 User’s Manual


Importing and Exporting Files

Left Align Text

Right Align Text

Center Align Text

Bold Text

Italicize Text

Underline Text

Strikeout Text

Bullet Text

Set Text Font

Set Text Color


Notes are saved with the TracePro Model by pressing the File|Save menu.

Importing and Exporting Files


TracePro can import files from many popular CAD formats.
To import” a CAD file, open it in TracePro using File|Open, and select “Files of
Type” to match the file type you wish to import. To export a CAD file, select
File|Save As.
TracePro can import and export files via the IGES (*.igs, *.iges)and STEP (*.stp,
*.step) interchange standards, and import files from popular lens design
applications.

CAD Translators
The following CAD translators are accessible from the File|Open and File|Save
As dialogs, by selecting the corresponding “Files of Type” or “Save As Type”: As of

the date of this manual, the following are supported.

TracePro 2022 User’s Manual 2.45


Creating a Solid Model

TABLE 2.3. Translators and file extensions

FIle Type Read Versions Write Versions


ACIS *.sat *.sat
AutoCAD *.dwg, *.dxf
Catia V4 *.exp, *.mod, *.model
Catia V5 *.catpart, *.catproduct
IGES *.igs, *.iges *.igs, *.iges
Inventor *.ipt
NX *.prt
Creo/ProE *.prt, *.prt.*, *.asm, *.asm.*
SolidEdge *.par, *.psm, *.asm
SOLIDWORKS *.sldprt, *.sldasm
STEP *.stp, *.step *.stp, *.step

Plot formats for model files


A picture of the model window can be saved into bitmap (BMP) and Windows
Enhanced Metafile (EMF) formats. Use the File|Save As dialog and the
corresponding “Save As Type”.

2.46 TracePro 2022 User’s Manual


Importing and Exporting Files

FIGURE 2.30 - File|Open dialog displaying selection of “Files of type”

Lens Design Files


You can import lens design data into TracePro from popular lens design
programs, including Code V, OSLO, and Zemax. You can open the lens design
data file as you would any other file, by selecting File|Open. TracePro
automatically creates a solid model of the lens design using the curvature,
thickness, material, and clear aperture data and saves it as an OML file. During
the translation, TracePro converts the lens design materials to the equivalent
TracePro materials. If clear aperture data are not present in the lens design file,
TracePro may create grossly oversized clear apertures. You will probably find it
easier to define the clear apertures in the lens design program before opening the
file in TracePro.

TracePro 2022 User’s Manual 2.47


Creating a Solid Model

Once the file is imported, you can apply Surface Properties in the usual way, just
as if the model had been created in TracePro. TracePro reads and understands
the material names in the lens design file and applies the appropriate Material
Properties. If some material properties are not applied correctly, you can apply
them manually in the usual way. You can check this quickly by using the System
Tree and expanding the objects to see the material assigned to them. If an object
has a material name but no catalog name, it will not be found when a raytrace is
performed. You must look up the material using the drop-down lists in the Apply
Properties dialog and apply the correct property.
A file is identified with a lens design program by the extension of the file as shown
in Table 2.4. These are the only supported file types for the respective programs.

TABLE 2.4. File Extensions

Extension Lens Design Program


SEQ Code V Sequence file
LEN OSLO file
OSL OSLO file
ZMX ZEMAX file

In the File|Open dialog box, there is a separate choice for each file format, in the
List Files of Type: drop-down list at the bottom of the dialog box.
TracePro supports the following features in lens design files (please note that not
all lens design programs offer all features):
• Radius or curvature input
• Conic constant (conic surfaces of revolution)
• Aspheric surfaces of revolution (up to r30)
• Global coordinate input
• Specification of material by glass name and manufacturer
• Surface tilts
• Decentered surfaces
• Decenter and return (Code V)
• Bend optical axis (Code V and OSLO)
• Reverse tilt/decenter (Code V)
• Circular, elliptical and rectangular clear apertures
• Decentered clear aperture
• Clear aperture rotations
• Circular, elliptical and rectangular obstructions
• Decentered obstruction
• Obstruction rotations
• Surface pickups (radius, thickness, material, aperture, obstruction, aspheric
coefficients)
• Dummy surfaces as thin sheet with “No Trace” flag set
• Surface labels and notes

2.48 TracePro 2022 User’s Manual


Importing and Exporting Files

Note: Files containing prisms are difficult for TracePro to import. Most files are
imported into TracePro correctly. Prisms are a notable exception. Simple wedges
may import correctly, but complex prisms will often appear as overlapping objects.
It is necessary to manually construct the prisms within TracePro.

Merging Files
Often when merging lens design data with data from a CAD program, the
coordinate systems do not coincide. The File|Merge dialog box gives you a way
to resolve the differences in the coordinate systems by converting one of the files
to the coordinate system of the other.
In mechanical CAD programs, it is customary to build models with the x-axis
pointing to the right and the y-axis or z-axis pointing up. In most optics programs,
including TracePro, the z-axis points to the right and the y-axis points up, leaving
the x-axis pointing into the screen.
To use Merge, you must have one of the two models open in a TracePro window.
Then you can merge the second file with the open one using Merge.
With one of the models open, select File|Merge to open the Merge dialog. You
can manually enter the rotation angles and translation of the second model
relative to the first, or you can use default rotation angles. When you press one of
the Default Model Rotations buttons, TracePro fills in the Rotation Angles for New
Model entries according to the conventions outlined above. Use the To CAD
button if the open model is in a CAD coordinate system and you are merging an
optical design. Use the To Optics button if you have a lens design open and you
are merging a CAD solid model. Optionally enter any coordinate shift between the
two in the Translation for New Model fields. Finally, press Merge and the File
Open dialog appears. Select the file you wish to merge and press OK.
Rotations are Euler rotations according to the right-hand rule. You can remember
this using the mnemonic y-z-x. All rotations can be remembered using this rule,
where the axes are always in the order x-y-z-x-y-z. Then an x rotation is y into z,
and a z rotation is x into y.

Inserting Files
You can insert one model into another by using the Geometry|Insert Part
menu item. You can keep files of standard parts on disk and insert them into
existing models. Choosing the Geometry|Insert Part menu item opens the
Open File dialog, but the model in the file is inserted into the currently open model
instead of going into a new window.

Update from RayViz


The menu selection Geometry|Update from RayViz allows you to update your
TracePro model from SOLIDWORKS via RayViz.If you are using SOLIDWORKS
with the RayViz add-in, simply export the updated model from SOLIDWORKS
using RayViz. Then, in TracePro, select Geometry|Update from RayViz to insert
the model into your current TracePro model. TracePro remembers which objects
came from SOLIDWORKS, and will replace then with the new objects in the
RayViz exported model. Any objects that were changed in TracePro will not be
affected.

TracePro 2022 User’s Manual 2.49


Creating a Solid Model

Geometry Toolbar button available for Update from RayViz

Changing the Model View


TracePro allows you complete flexibility in changing the view of the model. You
can have as many windows on each model open at one time as you wish. The
view in each window is changed by using menu items on the View menu. Many of
these are available on the View toolbar as well.
There are four types of views available in TracePro: Silhouette, Wireframe, and
Render. Silhouette is the default view, the one that is active when you open
TracePro or a new model. Wireframe view puts a wire grid on top of the surfaces
to give a 3D impression of their shape. Render view makes the objects appear
solid with shading based on the angle of incidence of an external, fictitious light
source. The Render view assumes that the light source is located at the eye
position of the viewer. All of the functions of TracePro can be carried out in any
type of view. For example, you can select objects or Boolean operations in
Silhouette, Render, or Wireframe.
Figure 2.31 shows an example of a model viewed in Render mode.

FIGURE 2.31 - Render view of the Elliptical Reflector

The View|Set View dialog box shows the underlying philosophy behind setting
the view in TracePro. This dialog box lets you set:
• Eye position
• Target Position
• Up Vector
• Perspective View On/Off
The eye position, target position and up vector can be set by entering numbers in
this dialog box, or by manipulating the view interactively as described in the
following sections.
The eye position is a point in 3D space from which the geometry is viewed. The
target position is a point in 3D space that the eye is looking toward. When you set
the target position, TracePro sets the current model window so that the target
position is at the center of the window.

2.50 TracePro 2022 User’s Manual


Changing the Model View

Sometimes the view may become clipped in TracePro, causing parts of the model
to disappear or be cut off. This happens when the eye point is inside the model –
parts of the model that are behind the eye point are not displayed. You can
ameliorate this problem by changing the coordinates of the eye point so that they
are outside the model using View|Set View, or by selecting View|Zoom All.
The Up vector is a vector in 3D space that determines the orientation of the view.
When you set the up vector, TracePro rotates the view until the up vector lies in
the plane of the screen pointing in the up direction.
The perspective check-box allows you to turn perspective viewing on or off to aid
in visualizing the model.
Once you have entered the numbers you desire for controlling the view, click
Apply to see the resulting view. However, you will probably find it more convenient
to use the interactive viewing controls.

Zooming
TracePro provides many different ways of zooming the window view in and out:
• Zoom In — Zooms in by a preset factor, the zoom factor is set in
View|Options|View
• Zoom Out — Zooms out by a preset factor, the zoom factor is set in
View|Options|View
• Zoom Ratio (no icon) — Opens a dialog box to type in a zoom factor
• Zoom Cursor — Zooms in as you hold down the left mouse button and move
the mouse up in the TracePro model window, OR 
—Zooms out as you hold down the left mouse button and move the mouse
down in the TracePro model window, OR
if you have a wheel mouse, you can use the wheel to zoom in or zoom out, OR
with a Shift-middle mouse button click.
• Zoom Window — Zooms to fit the rectangle formed by dragging a rubberband
rectangle with the cursor. This can also be activated with a Ctrl-middle mouse
button click.
• Zoom All — Zooms in or out until all the objects in the model are visible in the
window, with a margin of 10% around the edge.
• Zoom Selection — Zooms in or out until all the objects in current selection are
visible in the window.
The preset factors for Zoom In and Zoom Out can be changed using the Zoom tab
of the View|Options|View dialog box. The factory preset values are 2.0 and 0.5,
respectively. A separate value, which is 1.1 by default, is used for the wheel
mouse zooming.
Choosing Single-use zoom window means that after you complete a Zoom
Window command, the Zoom Window mode is exited, and the toolbar button
becomes unpressed. The default mode, in which the Single-use zoom window
box is unchecked, means that Zoom Window remains in effect until you disable it
by either clicking the Zoom Window toolbar button to toggle it, or by choosing
another zoom or selection tool.
The Zoom In, Zoom Out, Zoom Window, Zoom Cursor, Zoom Selection, and
Zoom All commands are available on the View toolbar.

TracePro 2022 User’s Manual 2.51


Creating a Solid Model

Panning
The View|Pan menu item, also available on the View toolbar, allows you to move
the view side to side and up and down. First choose the View|Pan menu item or
press the Pan toolbar button to enter panning mode. Then, while holding down the
mouse button, drag the mouse cursor around in the view. It is as though you are
dragging the objects in the window, but you are really dragging the view. The Pan
tool can be activated by pressing Ctrl-right mouse button.
Panning is equivalent to moving the eye position and the target position in unison,
keeping the target position in a plane perpendicular to the line between the two
points.

Rotating the View


There are many different ways to rotate the view. Two of them are accessed from
menu items:
• View|Profile
• View|Rotate
View|Profile lets you choose from five preset viewing angles: three orthogonal
views and two oblique views. They can be chosen from the toolbar as well as the
View|Profile menu. On the menu, the orthogonal views are listed as XY, XZ,
and YZ, according to the axes that are visible in each view. The oblique or
isometric views are illustrated by their buttons on the toolbar. The first, Iso 1, has
the y-axis pointing up, the z-axis pointing to the right and toward you, and the x-
axis to the right and away from you. The second, Iso 2, has the y-axis pointing up,
the z-axis pointing to the right and away from you, and the x-axis to the left and
away from you. The Rotate tool can be activated by pressing SHIFT-right mouse
button.
You can also use the arrow keys on your keyboard to rotate the view.

Named Views
Named Views are accessed by selecting View|Named Views. The Named Views
dialog is displayed, as shown below. The five default view orientations are listed
and can be activated from the View menu, View Toolbar or Named Views dialog.
These views will not change the Zoom factor of the Model Window. A new default
view, Normal To, will change the view orientation to the surface normal of a
selected planar surface. If the selection is invalid a message will be displayed.
Any view can be saved by entering a View Name in the dialog box and pressing
Save View. The Zoom and View data including rotation and pan will be stored and

2.52 TracePro 2022 User’s Manual


Changing the Model View

available for future recall. The new views are added to the listing in the dialog and
are saved in the model's OML file.

FIGURE 2.32 - Named Views dialog

Previous View
The View History will store the previous 10 views. Selecting View|Previous View
or the Previous View tool will change to the view.

All-mouse Mode
This command allows you to move the view of the model in the model window
using your mouse. When All-mouse mode is active, use the left mouse button to
orbit the view, the right mouse button to zoom the view (like Zoom Cursor), and
both mouse buttons to pan the view.

Controlling the Appearance of Objects

Display Object
You can control the display of each object independently using the View|Display
Object option. The default for all objects is to be displayed (i.e. visible) in all
Model windows. When a selected object is displayed, a check mark appears next
to the Display Object command under the edit menu. You hide an object by first
selecting the object either in the model window or the System Tree, then select
View|Display Object or select Display Object from the pop-up menu, available
by clicking the right mouse button in the model view or the System Tree. The
object is no longer displayed and the check mark next to Display Object will
disappear. The Display Object control affects the normal silhouette view, the
rendered view, and the wireframe views.
To display an object that has been hidden, you must select the object using the
System Tree. You can’t use the model window because the object is hidden! After
the object is selected, choose View|Display Object to redisplay the object. To
turn on the display of all objects, use the View|Display All command, described
below.

TracePro 2022 User’s Manual 2.53


Creating a Solid Model

Display All
All objects can be made visible using View|Display All. This function will
recalculate the silhouettes for the model view and redisplay the object in either the
normal or rendered views.

Display Object WCS


All TracePro Objects use a working (local) coordinate system (WCS) which in turn
is transformed from the Global Origin, displayed by the X,Y,Z axis. When moving
the object, the Absolute position is defined relative to the Global Origin. The WCS
display is enabled by selecting an Object and selecting the View|Display
Object WCS menu.

Figure 2.33 shows a Reflector, Lens and Primitive Sphere with their respective
WCSs displayed. The Reflector has its WCS origin at the vertex of the reflecting
surface, the Lens has its WCS origin at the vertex of the first surface and the
sphere has its WCS origin at the sphere's center.

FIGURE 2.33 - WCS of three TracePro objects

Display RepTile Expert

The RepTile display option draws the virtual RepTile Geometry in the model
window. To see the corresponding RepTile Geometry select View|Display
RepTile. The boundary of the RepTiles as defined in the Apply Properties dialog
is displayed along with the individual tile boundaries and geometry. See “RepTile
Examples” on page 9.1. Textured RepTile is also viewed with this option. When
RepTile Boundary Type: Use Surface Bounds is selected, there is no display of
the RepTile boundary.
Figure 2.34 shows a block with a prism type RepTile surface. The RepTile
property was applied with a Perfect Absorber surface property. A fan of rays is
shown absorbed by the RepTile features in the central portion of the surface and
leaving the block outside of the RepTile boundary.

2.54 TracePro 2022 User’s Manual


Changing the Model View

NOTE: If the RepTile has a large number of tiles or features, the display may take
a long time. You can interrupt the display of RepTile features by using the Esc key.

Y Y

Z X Z X

FIGURE 2.34 - Block with Prism RepTile surface displayed

Boundary Only
The Display RepTile|Boundary Only option is available for the instances when
you wish to see only the boundary of the RepTile region without any of the feature
information.
When RepTile Boundary Type: Use Surface Bounds is selected, this command
has no effect.

Display voxels
Once either an audit or a raytrace has been performed on a model, the Voxels can
be displayed by selecting View|Display Voxels. The Voxel Display can be
turned OFF by reselecting this menu item to remove the checkmark.
Voxelization is a method of “allocating” the geometry in the model to specific
zones to improve raytrace speed. Increasing the number of voxels improves
raytrace speed at the expense of Audit speed and memory usage. Voxel settings
are selected under Analysis|Raytrace Options|Advanced.

Display Importance Standard Expert

TracePro provides an option to display the size, orientation and location of surface
and source Importance Targets in the model window. The display is enabled via
the View|Importance Targets menu item. See “Importance Sampling” on
page 7.2.
Figure 2.35 shows a lens with a single importance target displayed with IT at the
target’s origin. One set of rays converges to the lens’s focus. Another set of rays
converges to the importance target and are the importance sampled rays. Other
rays are random scatter rays.

TracePro 2022 User’s Manual 2.55


Creating a Solid Model

IT

X Z

FIGURE 2.35 - Lens showing rays and importance target.

View Options
You can customize the operation of TracePro and change default settings using
the View|Options menu selection, which opens a dialog box for changing the
settings. See also “User Defaults” on page 1.11 about saving the default values
used in dialogs.

2.56 TracePro 2022 User’s Manual


Changing the Model View

General

FIGURE 2.36 - View|Options, General tab.

Properties Database
This entry sets the location of the properties database file. You can set this by
either typing in a new path and filename, or using the Browse feature to locate the
database file. Properties are stored in a file that is initially installed with the name
“TracePro.db”. You can copy the default database and build different data files
with different sets of property data.

Auto load scheme


With the auto load macro you can load a file to set the options and functions you
wish without calling Macro|Execute. See “Macro Programs” on page 8.7.

On Starting TracePro
The opening of model windows upon starting TracePro can be set to any of four
options:
• Open empty model window
• Open most recently edited model
• Prompt to open most recently edited model
• Don’t open any model window

Raytracing Threads Priority


You can select the priority for the TracePro process. If you need to do other tasks
while TracePro is running, use the default Below Normal or Low.

TracePro 2022 User’s Manual 2.57


Creating a Solid Model

Drive for temporary files during runtime


TracePro creates and uses temporary files during a Simulation Mode ray-trace.
These files are saved on the C: drive and deleted after the ray-trace is finished.
For a large ray-traces, the files may be very large. If you do not have enough free
disk space on you C: drive, choose a drive with more free disk space.

Number of recent opened files


This selection sets the number of recent files displayed at the bottom of the
File|Open dialog box.

Save Text File Format


You can save text files in one of two formats: Unicode or ANSI. Unicode format is
for those who need access to the wide character set that introduces characters
that are not in the Roman alphabet (e.g. from African, Asian, and Middle Eastern
languages). Note that if you use only the standard ASCII character set, then you
will likely prefer the ANSI format. Also, the Unicode format requires approximately
twice the file size as ANSI.

Check for updates at startup


If this selection is checked, TracePro will query the Lambda Research web site for
a newer release of TracePro. If your support subscription entitles you to this
newer release, TracePro will invite you to let it download and install the release
automatically.

Enable Spaceball
Support for Spaceball input devices is available. Do not enable the Spaceball
mode without the proper device drivers.

Warn when canceling raytrace


If this selection is checked, TracePro will warn you each time you cancel a
raytrace, that the raytrace cannot be resumed later.

Coating DLL Directory


This entry sets the directory that may be used when writing your own Coating
DLL. You can set this by either typing in a new path and filename, or using the
Browse feature to locate the directory. If you leave this entry blank, TracePro uses
the Windows default directory as the Coating DLL Directory.

Color
Background colors
These items select the background colors for the Model Window, System Tree
and Dialog Evaluators. Click in the color to display the Color Palette to change the
selection. See “Expression Evaluator” on page 1.15.
The Model Window can have two colors defining a color gradient from the top of
the window to the bottom. If both colors are the same, no color gradient is used.

2.58 TracePro 2022 User’s Manual


Changing the Model View

Object/Surface colors
These items select the colors used when an object is created in TracePro and
when an object or surface is Highlighted after it is selected. Click in the color to
display the Color Palette to change the selection.

Ray Display
Set default for menu: Analysis|Display Rays
This selection sets the default condition for the Analysis|Display Rays menu
item in any new models that are created. After a raytrace with a large number of
rays, this may take several minutes and consume too much memory, so this
feature allows you to disable automatic drawing of rays. The control of whether
rays are displayed for the current model is still controlled from the
Analysis|Display Rays menu item directly.

The Display ray direction arrows


This checkbox controls whether small arrows are attached to each ray segment
indicating the direction of propagation. The option is global to all active Model
Windows. Checking Display ray direction arrows enables the option, as shown
below.

Display non-intersecting rays


This option is the default case in TracePro and is the mode for older releases. By
turning off this option, TracePro will ignore rays that do not have a surface
intersection. Rays which leave a surface source, start from a ray grid or file source
are considered non-intersecting if they leave the model space without hitting any
surfaces.

Enable start ray drawing limit


If this option is checked, you can enter a number of starting rays to draw and
TracePro will only draw segments for the rays with start ray numbers less than the
number entered. If Ray Sorting is used, only rays in the Sorted set with start ray
numbers less than the number entered will be drawn. Start ray numbers are
displayed in the Incident Ray and Ray History tables.

TracePro 2022 User’s Manual 2.59


Creating a Solid Model

FIGURE 2.37 - Options dialog window with the Ray Display pane chosen.

Enable ray drawing time limit


When this selection is enabled, the rays in the Model Window will only be drawn
for the number of seconds specified. Note that after the Ray drawing time limit has
been changed in the View|Options dialog, the rays in the Model Window will not
automatically redraw. In order to keep TracePro from starting a possibly time
consuming procedure, Analysis|Ray Sorting must be updated or the Model
Window must be resized in order to trigger the redrawing of rays in the Model
Window.

View
Placement of System Tree
This item sets the location of the splitter window for the System Tree. It can be
located either on the right or left side of each model window.

Open System with xx% of the Model Window


The Open System tree option is used to automatically display the system tree
when a Model Window is opened. The value entered is a percent (0 - 100) of the
Model Window size.

Prompt before entering Simulation Raytrace


The Prompt before entering Simulation Raytrace box, checked by default, can be
unchecked to allow you to run repeated raytraces in a scheme macro without any
user interaction.

2.60 TracePro 2022 User’s Manual


Changing the Model View

Display Importance Target Labels


Display Importance Target object/surface label controls the labels when
Importance Target display is on. See “Display Importance” on page 2.55. The
labels can be turned off if the clutter the view. When the labels are displayed the
font size can be changed to improve the visibility of the labels.

Importance Target label font size


This entry sets the font size of the Importance Target labels.

Default model view


This control sets the default view orientation when opening models or creating
new models.

Zoom parameters
The Zoom parameters let you control the zooming functions. The Zoom in by: and
Zoom out by: entries control the zooming factors for the View|Zoom In and
View|Zoom Out, and the Zoom In and Zoom Out buttons. The Wheel zoom factor
is used to control the zooming when using the mouse wheel.
Checking the Single use zoom window check box causes the Zoom Window
mode to be turned off after one use of Zoom Window. The Zoom Window button
also becomes unpressed. In order to do another Zoom Window, you must select
Zoom Window again.

View rotation
The view direction in the Model Window can be rotated using the arrow keys on
your keyboard. This control allows you to set the rotation angle that occurs with
each keypress.

On opening models
When opening models, you can set TracePro to display all objects, or display only
objects that are set as visible (i.e. not hidden).

Model
TracePro lets you choose the linear units you prefer to use with the model
geometry. Available units are millimeters, centimeters, meters, and inches. Select
View|Options and choose the Model pane of the dialog box. Select your
preferred units via the drop-down list and click Apply. The model dimensions are
translated into the selected units. The selection applies to the current model. The
program default is that new models are created in millimeters. See “Model Units”
on page 2.1.

Getting a Model into the Proper Units


When importing geometry from outside of TracePro it is important to verify that the
model geometry is in the proper linear units before subsequent optical analysis is
performed. Most computer programs allow you to specify these units and the data
transfer into TracePro will be correct. Where this is not the case, TracePro can
easily make these adjustments so you may proceed with your analysis.
Here is a recommended sequence of steps to accomplish this in TracePro:

TracePro 2022 User’s Manual 2.61


Creating a Solid Model

1. After importing the model, determine which units you are currently viewing the
model in. This information is available in the status bar at the bottom of the
TracePro window whenever the mouse cursor is in the model view.
2. If you wish to work in units other than the ones shown, select View|Options
and choose the Model pane of the dialog box. From the drop-down list select
the linear units you desire and click Apply. (Verify that you are now viewing the
model in these newly selected units.)
3. Now look at the magnitude of the numbers. Are they correct? Are they too
large or too small? A scale factor needs to be determined to properly scale the
entire model. (i.e. all the objects)
4. Hint: Most computer programs use millimeters, centimeters, inches, or meters
to specify their geometry, so the desired scale factor is usually 10, 100, 1000,
2.54, 25.4, or the reciprocals of these numbers, as these scale factors
represent the scaling between these units of measure.
5. If the dimensions of objects in the model are not correct (this can happen if the
units were not specified in the imported CAD file), select all the objects in the
model (See “Selecting Objects and Surfaces” on page 1.11.) and select the
Edit|Object|Scale menu item. Enter the appropriate scale factor in the
Scale Selection dialog box and click Apply.
6. Verify your work and save the file. You are now ready to proceed with your
analysis.

Default Temperature Standard Expert

The Default Temperature for the current model can be specified in this dialog. This
temperature is effectively applied to all objects and surfaces in the model that do
not specifically have a temperature applied (Define|Apply
Properties|Temperature). For more information on the application of
Temperature Properties, See “Temperature” on page 4.36.

Environment
The Material Property and Bulk Scatter Property of the Environment can be
changed. The Material Properties and Bulk Scatter Properties in the user’s
database can be applied. The Environment is all of the space that is not inside of
and object.

2.62 TracePro 2022 User’s Manual


Changing the Model View

FIGURE 2.38 - Options dialog window with the Menu pane chosen.

Raytrace Mode
To change the default raytrace mode for new models, i.e. either Analysis Mode or
Simulation Mode, select View|Options|Raytrace Mode. Here you can also
control whether the prompt for Raytrace Mode appears before starting each ray-
trace.

Reset Defaults
You can reset the default values for dialog box entries using this page. Use this
option if you have changed any default values using the Set Defaults button found
in various dialog boxes, and you wish to revert to those present when TracePro
was first installed. You can reset default values for each dialog box individually, or
for all dialog boxes at once using the Reset All Above Default Values button.

TracePro 2022 User’s Manual 2.63


Creating a Solid Model

Changing Colors
A color selection dialog is used to specify the default object color, model window
highlight selection, window backgrounds, and dialog evaluator controls. The
dialog displayed in Figure 2.39 is consistently used through TracePro.

FIGURE 2.39 - Color selection dialog

Color can be selected from the palette or using the Custom Colors interface. After
a custom color is selected, press Add to Custom Colors to store the new color
definition.

Photorealistic Rendering
You can create a photorealistic rendering of your model to see how it looks with
TracePro properties applied. You can see how your model looks with the surface
sources you have defined, or add ambient luminance. If you just want to see what
the model looks like, you can use ambient luminance only. Use Photorealistic
Rendering with or without ambient luminance to get an impression of the “lit
appearance” of your model, i.e. to see how it looks with lights sources turned on.
You should use Photorealistic Rendering only after completing setup of your
model sufficient for tracing rays. The Photorealistic Rendering will use the
TracePro properties, surface sources, and ray-trace settings you have defined for
your model.
The rendering process consists of a forward ray trace, which defines a photon
map, followed by a reverse ray trace to build the rendered image. The forward
trace uses the photons stored in the photon map to evaluate relative luminance in
the scene. When you start a rendering calculation, you will see a Progress Dialog
Box for the forward ray trace, followed by another Progress Dialog Box for the
reverse ray trace.
To set up and calculate your rendering, follow these steps:

2.64 TracePro 2022 User’s Manual


Photorealistic Rendering

1. Select Raytrace|RayTrace Options. On the Thresholds tab, set the Flux


Threshold to 0.001 as a first guess. On the Advanced tab, set Voxel
Parameters to Fastest Raytrace. If your model uses Octree Voxels, set the
parameters for a fast ray trace.
2. Select View|Photorealistic Rendering>Setup, and choose Rendering
Quality = Low as a first guess. Set Ambient Luminance as you desire.
3. Set the Model Window to the orientation you wish to render, and set the
window size relatively small for a faster rendering.
4. Select View|Photorealistic Rendering>Render to begin the rendering. A
new window will open that is the same size as the model view, and the forward
ray trace will begin, followed by the reverse ray trace. The time to finish the
rendering may be minutes to hours, depending on the complexity of the model
and properties, the size of the Model View window, the flux threshold, the
Rendering Quality setting, and the number of processors available on the
computer. You can stop the rendering at any time to see a partial result.
5. Once the rendering is completed, you can adjust the brightness, contrast, and
gamma using View|Photorealistic Rendering|Options.
6. Adjust the flux threshold up or down to trade accuracy for speed, as you would
for a normal ray trace.
7. Adjust the Rendering Quality setting for more rendering passes (i.e. more
rays/pixel) to improve the rendering quality. Each Rendering Quality setting
traces 10 times more rays/pixel than the next lower setting.
Hint: Once you have the Model Window set to a view that you like, use
View|Named Views to save the view for ease in repeating the rendering at a later
time.
Limitations of Photorealistic Rendering in TracePro are as follows:
1. Dispersion is not modeled. This means that, for example, separation of colors
by a prism or grating is not modeled. Effective index of refraction of transparent
materials is computed as the average index across the visible spectrum,
weighted by the photopic efficacy. Diffraction, if specified, is computed at
wavelength 0.55 µm for all colors.
2. Polarization is not modeled. If you begin a rendering with polarization on
(according to the setting in Raytrace|Raytrace Options, Options tab)
TracePro will change the polarization setting to unchecked before beginning
the rendering.
3. Coating DLL surface properties are not modeled.
4. Coating Stack surface properties are not modeled.
5. Bulk Scatter DLL properties are not modeled.
6. Grid Sources are not modeled.

Photorealistic Rendering Setup


The settings in the Photorealistic Rendering Setup dialog box let you control the
ambient lighting in the rendering, and trade off rendering quality with time to
render. Specify these parameters before beginning a Photorealistic Rendering.
Select Photorealistic Rendering|Setup to set these values.

TracePro 2022 User’s Manual 2.65


Creating a Solid Model

Ambient Luminance
The Ambient Luminance setting allows you to add background light so you can
better see the objects you are rendering.
Specify the Ambient Luminance by specifying the luminance in cd/m2 (nit). You
can choose from the available luminance values for Outdoor and Office, or enter
your own luminance value by choosing Custom..
Lighting in the photorealistic rendering will be comprised of the surface sources in
the model plus the ambient luminance. The source of the ambient luminance is a
virtual hemisphere. The ambient luminance is effectively emitted from the inside
of the hemisphere. The (X, Y, Z) values for the Ambient Lighting Direction
specify a vector pointing towards the pole of the hemisphere. For example, if your
model has the y axis as the "up" direction in your view, and you want ambient
lighting coming from above, specify (0 1 0) for the (X Y Z) ambient lighting
direction vector.

Rendering Quality
There are five different quality settings for the rendering:
• Low
• Medium
• High
• Extra High
• Extremely High
Each higher setting takes roughly ten times longer to render than the previous
setting.
For a quick view of the rendering when some noise is acceptable, choose Low.
For many applications, the High setting will be sufficient to get a satisfactory
rendering.
If the design is inefficient or otherwise difficult to simulate, you may need to use
the higher settings.

Max Photons To Trace


TracePro uses the technique of Photon Mapping to compute a Photorealistic
Rendering. This is comprised of a forward ray trace or photon trace (rays emitted
from light sources) followed by a reverse ray trace (rays emitted from the eye
point). The forward ray trace generates a photon map, which is then evaluated
during the reverse ray trace to produce the rendered result. A good rendering
requires adequate sampling in the photon map, followed by adequate sampling in
the reverse ray trace. The sampling in the photon map is controlled by the Max
Photons To Trace setting. In most cases you should leave this setting at 0, and
let TracePro determine the optimal number of photons to trace.

Photorealistic Rendering Options


Once your rendering is completed, you can control the appearance of the
rendering using Photorealistic Rendering Options. To open the Photorealistic
Rendering Options dialog box shown in Figure 2.40, select

2.66 TracePro 2022 User’s Manual


Photorealistic Rendering

View|Photorealistic Rendering|Options, or right-click on the completed


rendering and select Photorealistic Rendering Options. The options allow you to
adjust Brightness and Contrast from 0 to 1 and Gamma from 0-3 for the rendered
image.
Normalize to: has 3 options: None, Highest Color, and Exposure Level. Selecting
Highest Color will normalize the displayed color value in the plot. Selecting
Exposure Level will normalize the plot to display a saturated white color, even is
the plot is monochromatic. For example, with green light the saturated values
would be (0,255,0).
Saturated Color allows you to turn the Saturated Color on or off. The RGB values
can range from 0-255. Saturated Color shows any pixels where any of the RGB
values are 255. You can change the color for saturated pixels by clicking on the
color bar.
Value mode has two options, Raw value and Integer. This setting controls the
values displayed in the Status Bar when you move the mouse pointer over the
map or rendering. The Raw value displays the floating-point RGB values in the
Status Bar as calculated by TracePro to create the True Color image. When
Integer is selected, the actual integer values used in the image (0-255 RGB) are
displayed.
If Normalize to: is set to Exposure value and the Calculate exposure
compensation box is checked, the Exposure compensation value for saturated
white will be calculated automatically. If the Calculate exposure compensation box
is not checked, an Exposure compensation value can be manually entered.

In Photorealistic Rendering, the approximate luminance in cd/m2 is displayed as a


fourth value in the Status Bar.

Displaying approximate luminance


You can also display the approximate luminance values as determined by the
rendering algorithm. Select Map Type: Luminance to unlock the controls for:
• Color Scheme - Grayscale or Color (Rainbow)
• Log scale - logarithm of luminance will be displayed
• Show Legend - draw a legend inside the rendering window
• Set Max and Set Min - set the minimum and maximum luminance values to be
displayed.

TracePro 2022 User’s Manual 2.67


Creating a Solid Model

FIGURE 2.40 - Photorealistic Rendering Options

Photorealistic Rendering with Fluorescence


TracePro can perform Photorealistic Rendering using fluorescence generated File
Sources. There are several steps to follow in order to accomplish this.
1. Turn Fluorescence On at Raytrace|Raytrace Options|Options
2. Select Insert file source in the same dialog box
3. Select Generate emission source only from the dropdown menu
4. Run the raytrace
5. Turn off Fluorescence at Raytrace|Raytrace Options|Options
6. Turn off the excitation light source in the Source tree
7. Run the Photorealistic Rendering as described above
8. Please note that you will need to trace a large number of rays to get a good
quality result

2.68 TracePro 2022 User’s Manual


Overview

CHAPTER 3 Defining Properties

Overview
What is a property?
Properties are modifiers to objects and/or surfaces that determine how rays will
interact to these objects. Examples of properties include materials, surface
finishes, temperature, light source, and transmission characteristics. There are
pre-defined properties, but you may also define your own.

Define or Apply Properties


This chapter covers defining custom properties that you can use in your model.
Typically, you need to “define” properties before you can “apply” them. However,
in order to define properties correctly, you will need measured data for the
properties you wish to define. For instance, if you have a special paint that you
want to use on a given surface of your solid model, you must have the properties
of that paint measured before you define TracePro properties for it.
If you plan on using only the pre-defined properties in the TracePro
databases, you should just read the first few sections of this chapter and
refer to Chapter 4, “Applying Properties”.
You can come back to this chapter when you need to define custom properties.
The remainder of this chapter assumes that you have already read about applying
properties in Chapter 4. Properties are defined using Property Editors. Selecting
Define|Edit Property Data|Material Properties, for example, opens a
new window for creating and editing material properties. All property editors work
in this way.

Property Editors
TracePro property editors share common features described in this section. Each
editor is comprised of a Command Panel, Information Panel and Grid Panel.
The Material Property editor is shown in Figure 3.1 with the Command Panel on
the left, the Information Panel on the top and the Grid Panel on the bottom.
Toolbar buttons are provided to hide editor tabs to expand the tab of interest. For
Material Properties, the data tab is split between the Table view for tabular input
and the Formula view for interpolation coefficients. The tool bar includes lock/
unlock icons used to enable editing.
The Surface Property editor is shown in Figure 3.2 with several columns collapsed
and the data context contextual popup menu displayed. In addition to the other
general changes, individual rows of data in the Surface Property editor may use
the Solve For function on a row by row basis from the popup menu.

TracePro 2022 User’s Manual 3.1


Defining Properties

Toolbar Information Panel

Command Panel Grid Panel

FIGURE 3.1 - Material Property Editor

Collapsed Columns

Context popup menu

FIGURE 3.2 - Surface Property Editor with a cell popup menu

3.2 TracePro 2022 User’s Manual


Property Editors

Toolbars and Menus


Each tool bar icon has a corresponding Menu item.
TABLE 3.1. Editor menu and toolbar commands

Menu Toolbar Description


File|Import Property Import property data from ASCII file

File|Export Property Export current property to ASCii file

File|Save Save current property data

Edit|Lock Property This icon indicates that the current prop-


erty is in Edit Mode, selecting the menu
or pressing on the icon will place the
property in Locked mode and disable
further editing
Edit|Unlock Property This icon indicates that the current prop-
erty is in Locked Mode, selecting the
menu or pressing on the icon will place
the property in Edit mode and permit
modification of the data
View|All Panels This selection exposes the three tabs or
panels in the editor

View|Info & Grid This selection hides the Command tabs


to maximize the width of the Information
and Grid tabs
View|Info Only This selection maximizes the Informa-
tion tab

View|Grid Only This selection maximizes the Grid tab

(no menu) The Expand icon is displayed when a


set of rows is collapsed. Double Clicking
on the icon will restore the rows
(no menu) The Collapse icon is displayed when the
row is followed by rows with the same
data value. Double Clicking on the icon
will hide the subsequent rows

Command Panel
The Command Panel provides buttons to work with Catalogs, Properties and
Data. The Command Panel is located on the left side of the editor in a split
window tab. The width of the tab may be set by dragging the splitter bar. Some of
the options will vary depending on the type of property being viewed.

TracePro 2022 User’s Manual 3.3


Defining Properties

TABLE 3.2. Command Panel buttons


Add Catalog This button displays a dialog asking for the name of a new catalog. The new
catalog will begin empty and become the current catalog in the editor.
Delete Catalog This button deletes the current catalog from the TracePro database file. A
Warning dialog is displayed. Once a catalog is deleted it can not be
retrieved. See “Properties Database” on page 2.57.
Add Property This button displays a dialog asking for a property name and other initial
property data. The property will be added to the current catalog.
Delete Property This button deletes the current property from the catalog. A Warning dialog is
displayed. Once the property is deleted it can not be retrieved.
Copy Property This button prompts for a new catalog and property name. The data is cop-
ied causing a new property to be added to the selected catalog.
Sort by... This button displays the Sort Dialog. Properties with two or more dependant
variables can be sorted based on a selected order of variables. For example,
Material properties with tabular data may be sorted by Temperature then
Wavelength or by Wavelength then Temperature.
Add... This button displays the Add Data Dialog. One or more rows of data will be
added to the property for the value entered in the dialog.
The Add function automatically creates all the necessary rows to keep each
temperature, wavelength, and incident angle consistent (i.e., you need all
the data for each sortable index).
Delete... This button displays the Delete Data Dialog. You can select one or more val-
ues to delete from the property and the selected rows will be highlighted.
Once the data is deleted it can not be retrieved.
Solve For: Surface Properties have an option to solve for one data value based on the
the values of the other data items. The Solve For list is only visible in the
Surface Property Editor and works over the entire dataset. To solve for an
individual row, select the value to solve and use the popup menu. See “Using
Solve for” on page 3.27.
Plot Options Surface Properties have an Plot view in the Grid Panel. The Plot Options are
used to control the data displayed in the plot. See “Surface Property Plot Tab
” on page 3.30.

Information Panel
The Information Panel is located in the top, right tab of the editor. This panel
displays the Catalog and Name of the property, a description and other general
property data. Some pre-defined properties are read only, and thus you cannot
change them. These properties are maintained by Lambda Research. If you wish
to modify a read-only property, make a copy using the Copy Property function,
and modify and apply the copy.

Grid Panel
The Grid Panel, or Data Panel, is located in the lower, right tab of the editor. This
panel displays tabular data and coefficients. In some cases the data is divided into
two or mare tabbed tabs as shown in Figure 3.1 on page 3.2. The Grid contains
spreadsheet tables with context sensitive popup menus for most of the data cells.
Rows and columns may be collapsed to hide some data, exposing other cells.
Clicking on a column heading will collapse or un-collapse that column. Rows may
also be sorted to view the data in different ways to made editing more convenient.
Row sorting is accomplished by pressing the Sort by... button in the Command
Panel area or by right clicking on the tabular data in the grid and selecting Sort by.

3.4 TracePro 2022 User’s Manual


Material Properties

Material Properties
The material property (of an object) in TracePro specifies the index of refraction
and the bulk absorption. To use a material property, select the Define|Apply
Properties dialog box, then select the tab labeled “Material.” See “Material
Properties” on page 4.4.

Material Catalogs
Several catalogs of manufacturer data come with TracePro. You can also add
your own catalogs and materials. These catalogs and materials will then appear
as options within the Information Panel selections.

Material Property Database


A database exists containing predefined material catalogs and materials. You can
choose among them or you can add or modify user-defined materials by using the
Material Property editor.
You can add or modify materials in the Property Database by selecting
Define|Edit Property Data|Material Properties. This opens a new
window in TracePro, not just a dialog box like many other features.
The Material Property editor allows you to modify the name, interpolation type,
description, temperature and wavelength of certain materials. Some pre-defined
material data supplied with TracePro is Read-Only and cannot be edited.
A spreadsheet-like window displays the index and absorption coefficients when
interpolation is by interpolation formulae, or wavelengths and index values for
tabular data. Absorption coefficient data may be entered as  in units of 1/mm, or
k, which is dimensionless. See Equation 3.4 on page 3.8.
Selecting a catalog and entering a material name or selecting one from the list
causes TracePro to display the data for that material in the editor window. You can
add new materials and catalogs by using the respective Add buttons in the editor
window Command Panel. Ten interpolation formulas are available for material
property data. You must choose the interpolation type when using the Material
Property editor. For example, Figure 3.3 on the next page shows the Formula tab
for entering the coefficients for the Sellmeier interpolation method.
Note: The Properties editors are different from most features in TracePro
because each one is a window rather than a dialog box. The menu bar displays a
different set of options when you are in the editor window. If you are in the editor,
you can return to the model window by selecting the model item from the Window
menu.
TABLE 3.3. Fields used in the Material Property Information Panel
Catalog Selects a Material property catalog.
Name Material property name selection box. The name can be selected using the
drop down arrow or by typing the name into the text box. If the name is found
in the database its data will be displayed.
Description The description contains notes about the Material Property.

TracePro 2022 User’s Manual 3.5


Defining Properties

Interpolation Selects the interpolation method. Schott, Sellmeier, Extended Schott, Table
and other interpolation methods are available. See “Material Property Interpo-
lation” on page 7.7.
Type The type of property is displayed next to the Interpolation method. The avail-
able types are Isotropic and Uniaxial. Isotropic properties have a single refrac-
Expert tive index and Uniaxial properties are Birefringent. The type is set in the Add
Property dialog when the property is originally defined.

FIGURE 3.3 - The Material Property Editor

Create a new material property


The steps listed below show the method to create a new property within Material
Properties.
1. Select Define|Edit Property Data|Material Properties to open the
Material Property editor.
2. Select a catalog, using the dropdown catalog list, into which your new material
property is to be added. Add the material to an existing catalog or use the Add
Catalog button to create your own.
3. Click the Add Property button, enter a name for your new property and click
OK. For users of TracePro Expert also select if the material is isotropic (i.e.,
single refractive index) or uniaxial (i.e., birefringent).
4. Select the interpolation type. If not tabular data, click on the Formula tab at the
bottom of the Grid Panel area and enter the values for that equation. There is
more information on this subject in “Material Property Interpolation” on
page 7.7.
5. Click the Table tab and use the Add button to add absorption data or tabular
index data at multiple wavelengths. This data is in spreadsheet-like format.

3.6 TracePro 2022 User’s Manual


Material Properties

6. You can edit the values that define the property simply by selecting a cell or
field and entering your numbers. Be sure, however, that the Unlock Icon is
displayed in the Toolbar.
7. Select File|Save or close the Material Property editor and answer yes to the
question, “property data has changed, save data?” Your new property is
available in the database for future use the next time you access your property.

Editing an existing material property


The steps listed below show the method to edit an existing property within
Material Properties.
1. Select Define|Edit Property Data|Material Properties to open the
Material Property editor.
2. Choose a catalog from the catalog dropdown list.
3. Choose the name of your property from the name dropdown list.
4. Click the Lock icon in the Toolbar to enable editing. You cannot make changes
to a property that is Read Only. Pre-defined manufacturer properties cannot be
edited unless you export them to text format, change their status to user
defined, and re-import them into TracePro. See “Material Property Format” on
page 7.93.
5. Edit the values that define a property by selecting a cell or field and entering
your data.
6. Select File|Save or close the Material Property editor and answer yes to the
prompt, “Property has changed, save data?” The edited property is now
available in the database.

Exporting a material property


The steps listed below show the method to export a property within Material
Properties.
1. Select Define|Edit Property Data|Material Properties to open the
Material Property editor.
2. Choose a catalog from the dropdown list of catalogs.
3. Choose the name of your property from the dropdown list.
4. Use the File|Export Property command to create a text file that contains
the information for the selected property. See “Material Property Format” on
page 7.93. The exported file is a tab-delimited text file that can be opened with
a spreadsheet program.

TracePro 2022 User’s Manual 3.7


Defining Properties

Importing a Material Property


The steps listed below show the method to import a property into Material
Properties.
1. Select Define|Edit Property Data|Material Properties to open the
Material Property editor.
2. Use the File|Import Property command to import a text file (in the proper
format) that contains the information for a material property. You will be
prompted to enter the name and location of the text file. The property is saved
upon importing.

Bulk Absorption
The units for the absorption coefficient are 1/mm. Rays that enter a material with
non-zero absorption coefficient are attenuated according to Beer-Lambert law of
transmission,

– t
T = 0 e , (3.1)

where  and 0 are transmitted and incident flux,  is absorption coefficient, and
t is the thickness of material through which the ray travels. The flux absorbed by
the material is then

– t
A = 0  1 – e . (3.2)

Note: When entering bulk absorption for materials defined using the table
interpolation type, remember that bulk absorption is in units of inverse millimeters.
Table 3.4 illustrates use of Lambert’s law for two samples at 1 and 2 mm
thickness.
TABLE 3.4. Bulk Absorption in Inverse Millimeters

Absorption Transmission Transmission


Coefficient through 1 mm through 2 mm
0.0001 0.9999 0.9998
0.001 0.999 0.998002
0.01 0.99005 0.980199
0.1 0.904837 0.818731
1 0.367879 0.135335

Note: Absorption data is saved in terms of  in the database.  is in units of


inverse mm. You can also enter the data using the Extinction coefficient, k, which
is a dimensionless quantity that comes from the complex index in Equation 3.3.

N = n + ik (3.3)
k and  are related via the following:

4k
 = --------- . (3.4)

When converting k to and from , you must be careful to use  in millimeters.

3.8 TracePro 2022 User’s Manual


Bulk Scatter Properties

Birefringence Expert

When a ray passes through a birefringent media, the ray is split into an ordinary
and an extraordinary segment. Birefringent properties are labeled as Uniaxial and
require additional information to define two sets of index and absorption data, one
for the ordinary and one for the extraordinary ray.

FIGURE 3.4 - Material Editor for a Birefringent Property

For information on birefringent materials see:


• M. Born and E. Wolf, “Principles of Optics”, Pergamon Press, sixth edition,
chapter 14 (1980), ISBN: 008026481
• P. Yeh and C. Gu, “Optics of Liquid Crystal Displays”, John Wiley & Sons,
chapter 3 (1999), ISBN: 047118201X
• E. Collett, “Polarized Light”, Marcel Dekker, Inc., chapter 23 (1993), ISBN:
0824787293

Bulk Scatter Properties Standard Expert

The Bulk Scattering Property Editor is used to:


• Edit properties that are stored in the bulk scatter property database.
• Create new properties for addition to the bulk scatter database.
One scattering distribution function (SDF) that has been implemented in TracePro
is based on a paper by Jacques and Wang1 that describes scattering in biological
tissue and uses the Henyey-Greenstein model. Equation 3.5

1. S. L. Jacques and L.-H. Wang, “Monte Carlo modeling of light transport in tissues,” in Optical Thermal Response of Laser Irra-
diated Tissue, edited by A. J. Welch and M. J. C. van Gemert (Plenum Press, New York, 1995), pp. 73-100.

TracePro 2022 User’s Manual 3.9


Defining Properties

2
1–g
SDF = p    = ------------------------------------------------------------- (3.5)
2 32
4   1 + g – 2g cos  
where g is called the anisotropy factor, and g can take on values between –1 and
1. When g is positive, rays are scattered more in the forward direction, and when
g is negative, they are scattered more in the backward direction. When g is zero,
the scattering is isotropic, i.e. the same in all directions. See “Bulk Scattering” on
page 7.61.
When a ray enters a scattering medium, it propagates a random distance x
governed by the probability distribution

– sx
Px = e dx (3.6)
where  s is called the scattering coefficient. The inverse of the scattering
coefficient is the mean free path of the ray in the material. When a ray enters a
piece of material that is thin compared to the mean free path, it is likely to pass
through the material without being scattered. Conversely, if the material is thick
compared to the mean free path, the ray is almost certain to scatter within the
material. When a strong scattering coefficient is combined with a strong
absorption coefficient, rays will be only weakly transmitted through the material.
A second SDF is available called the Gegenbauer model. The Henyey-
Greenstein2 is a special case of the Gegenbauer model setting alpha to 1/2.

K
SDF = p    = ----------------------------------------------------
+1
- (3.7)
2
 1 + g – 2g cos  

2 2
1 – g 
K = g ----------------------------------------------------------
2
- (3.8)
1 + g  –  1 – g 2  
TracePro Expert provides a third option for User Defined DLL scattering. See
“Using Scatter DLLs” on page 7.63.

Bulk Scatter Property Editor


The bulk scattering property editor defines and modifies scattering profiles stored
in the TracePro property database. Select Define|Edit Properties|Bulk
Scatter Properties to open the editor window.

2. A. N. Yaroslavsky, I. V. Yaroslavsky, T. Goldbach, and H.-J. Schwarzmaier, “Influence of the scattering phase function approx-
imation on the optical properties of blood determined from the integrating sphere measurements”, Journal of Biomedical Optics
4(1), 47-53 (January 1999)

3.10 TracePro 2022 User’s Manual


Bulk Scatter Properties

TABLE 3.5. Fields used in the Bulk Scattering Information Panel


Catalog Property catalog names.
Name Scatter Property Name dropdown box. Select the name from the drop down
list or by typing the name into the text box. If the name is found in the database
its data is displayed.
Description The description contains notes about the Bulk Scatter Property.
Type The Type displays the selected scatter model. The scatter model is defined
when a New Property is added to the database. The three models available
are:
Henyey-Greenstein
Gegenbauer
User DLL Expert

FIGURE 3.5 - The Bulk Scatter Property Editor

TABLE 3.6. Fields used in the Bulk Scattering Grid Panel


Anisotropy Enter the anisotropy factor, g, for the selected wavelength. This measure
describes the uneven propagation of light from +1 (forward) to –1 (backward).
Scatter  Enter the scattering coefficient, s, for the selected wavelength in units of 1/
Coefficient mm.
Alpha This is displayed for the Gegenbauer scatter model.
Coeff 0-5 These columns replace the data columns when a DLL scatter model is used.
Expert
The data entered is passed into the DLL and is used as variable input to alter
the DLL calculations.

Import/Export
The Import/Export format is documented in “Bulk Scatter Property Format” on
page 7.105. When the editor is open, the File menu displays Import Property and
Export Property menus.

TracePro 2022 User’s Manual 3.11


Defining Properties

Scatter DLL Expert

TracePro Expert provides functionality to define phase functions for Bulk


Scattering through compiled Dynamic Link Libraries (DLLs). Data from TracePro
is passed into the DLL during raytrace. The DLL calculates a result, which is
passed back to TracePro and used to scatter the ray. The Bulk Scatter Editor is
used to select the desired DLL and to add user parameter data to control the
calculations performed in the DLL. For more information about “User Defined Bulk
Scatter”, see page 7.63.

Fluorescence Properties Expert

Fluorescence is modeled in TracePro through the use of a Fluorescence Property


in combination with an object’s material properties. Fluorescence includes relative
absorption and relative excitation normalized to the peak molar extinction
coefficient, and relative emission. All of the values can be created with variation
versus temperature and wavelength. Concentration of the fluorescing material
can be set in the model by entering the molar concentration when applying the
property to a solid object. A two stage ray trace is used when Fluorescence is
enabled in the Raytrace Options. In the first stage of the ray trace, rays are traced
in the excitation part of the material spectrum. A by-product of the first stage of the
ray trace is that TracePro ray files are generated which contain rays emanating
from sites in the fluorescent material. The second stage of the ray trace uses the
ray files to trace fluorescent rays.

FIGURE 3.6 - Fluorescence Property Editor: Excitation Table

3.12 TracePro 2022 User’s Manual


Fluorescence Properties

Defining Fluorescence Properties


Clicking on the Add Property button in the Catalog section of the Fluorescence
Editor allows you to enter the data shown in the top tab of Figure 3.6:
• Descriptive text (optional)
• Conversion Efficiency
• Peak molar extinction
At this point, you can switch between entering excitation data (Figure 3.6) and
emission data (Figure 3.7) by clicking on the appropriate tabs in the lower tab of
the Fluorescence Property Editor.
Data to be entered in the Excitation Table:
• Temperature and Excitation Wavelength data - by clicking on the Add button in
the Data Points section
• Relative Absorption during the excitation stage
• Relative Excitation during the excitation stage

FIGURE 3.7 - Fluorescence Property Editor: Emission Table

Data to be entered in the Emission Table:


• Temperature and Excitation Wavelength data - by clicking on the Add button in
the Data Points section
• Relative Emission during the emission stage

TracePro 2022 User’s Manual 3.13


Defining Properties

The relative absorption, relative excitation, and relative emission values are
normalized.

Using the Fluorescence Property Generator


The Fluorescence Property Generator allows you to create a Fluorescence
PropertyProperty from published data for Absorption, Excitation, and Emission
spectra. The Fluorescence Property Generator has its own help system. To open
the Fluorescence Generator, select Define|Generate Property
Data|Fluorescence Property.

Fluorescence Calculations
It is customary, in measuring fluorescence spectra, to express the peak molar
extinction in base 10 rather than base e. The base 10 absorption coefficient is
then
10
 a    = ab   K peak C molar

where K peak is the peak molar extinction corresponding to the value of 1 in the
relative absorption ab    , and C molar is the molar concentration in the particular
sample. The transmittance through a sample of thickness t is then
10
–a t
 = 10
The absorption coefficient used in a non-fluorescent material property in TracePro
is related to the base 10 absorption coefficient by
10
 a =  a ln 10
This is used for Lambert/Beer Law absorption, in which the transmittance through
a thickness t is
–a t
 = e
The optics absorption coefficient µa is computed internally in TracePro for use by
the raytrace. The same rule applies to the relative excitation values.
Note: the absorption coefficients: base 10,  a10 , or base e,  a ; and the
thickness, t, must be in the same units for these equations to be valid. For
example if the first is in millimeters, the second should be in millimeters. However,
note that the peak molar extinction, Kpeak, is in partial units of inverse centimeters
(see the first equation in this section and Figure 3.7. Though TracePro works by
default in millimeters, the peak molar extinction is typically provided in partial units
of inverse centimeters. You must be consistent in using units of centimeters for
these calculations.

3.14 TracePro 2022 User’s Manual


Fluorescence Properties

Fluorescence Ray Trace


A fluorescence ray trace is done in two stages:

Create Model

Ray trace light that illuminates


Stage 1 of the ray trace fluorescent material

Calculate Fluorescence &


Create Fluorescent Source Files

Ray trace light emanating


Stage 2 of the ray trace from fluorescent material

Perform Analyses

FIGURE 3.8 - Fluorescence ray trace involves two stages

Stage 1: Initial rays are traced in the TracePro model. Any source wavelengths
(that also happen to be within the excitation band of fluorescent materials in the
model) will be involved in the fluorescence calculation. Note that any wavelengths
defined with the selection of Fluorescence emission wavebands will not be valid
for the excitation of fluorescent materials in TracePro. The end result of this stage
of the ray trace is that ray files containing fluorescent ray data are created.
Stage 2: Fluorescent rays are traced from the previously generated ray files at the
mid-points of the Fluorescence emission wavebands defined for each fluorescing
object in the Fluorescence tab of the Apply Properties dialog box. Note that for the
highest waveband (  N to  ), where the mid-point is ill defined, the fluorescence
wavelength is two times the lowest wavelength in the waveband, i.e.  = 2 N .

Figure 3.9 illustrates how property and ray trace data are used in each step of the
fluorescence modeling process.

TracePro 2022 User’s Manual 3.15


Defining Properties

FIGURE 3.9 - Process to perform Fluorescence simulation in TracePro.

Raytrace Options
Fluorescence Option
You can enable the calculation of fluorescent rays via a checkbox in the
Raytrace|Raytrace Options dialog, Options tab. After the Fluorescence option
is checked, there are related options:
There is a drop-down list with two choices:
Immediately trace emission wavelengths - At the conclusion of the excitation
ray-trace, the emission ray-trace will automatically begin, so that emission rays
are “mixed in” with excitation rays. All irradiance map features, candela plots, flux
report, etc. will report the fluorescence emission ray results along with the
excitation ray results.
Generate emission source only - At the conclusion of the excitation ray-trace,
the emission ray files are generated, but the emission rays will not be traced. You
can trace them later at your discretion, by:
a. inserting the emission ray file(s) into the model (or any model you
choose)
b. disabling any other sources in the Source Tree or Source/Wavelength
Selector (or modifying any surface sources in the model to have zero
rays, or simply removing the source property altogether)
c. unchecking the Fluorescence option in the Raytrace Options dialog
box
d. initiating a raytrace.
Insert file source - During the fluorescence raytrace, TracePro will generate ray
launch positions and angles to simulate fluorescence emission. These generated
rays are stored in ray files to be used during the emission part of the raytrace. This
option is used to automatically include the generated ray files into the model.

3.16 TracePro 2022 User’s Manual


Surface Source Properties

Surface Source Properties


Surface Source Properties describe the emission of surface sources versus
temperature, wavelength, and angle. To create a surface source property, you
select the Spectral Type and Angular Type of the property.

Spectral Types Angular Types


Rectangular Lambertian
Gaussian Uniform
Solar Gaussian
Table Solar
Table

Any Spectral Type can be combined with any Angular Type. The data required to
fully specify the property will vary depending on the choices you make for the
Types.

Surface Source Property Editor


In TracePro, surface source properties are identified by a name and stored in a
database.
The Surface Source Property editor lets you edit all the surface source properties
that exist in the surface source property database or create new surface source
properties.
To open the surface source editor, select Define|Edit Property Data, then
select Surface Source Properties. Instead of opening as a dialog box, the
editor opens as a window. You can return to the model window by selecting the
model at the bottom of the Window menu.
Note: The TracePro main menu bar displays a different set of options when you
are in the editor window. Once you are in the Surface Source Property Editor
window, you can return to the model window by selecting the model item from the
Window menu, or simply clicking on the title bar of the model window.
The Surface Source Property Editor has several parts:
• Catalog, Name, and Description
• Spectral Type and Angular Type
• Emission
• Emissivity spreadsheet
The Emission value specifies how much total flux or irradiance/illuminance the
source will emit, in whatever units are selected. The Emissivity values in the
spreadsheet serve as weighting factors only and are not absolute emissivities.

TracePro 2022 User’s Manual 3.17


Defining Properties

FIGURE 3.10 - The Surface Source Property Editor

TABLE 3.7. Fields in the Surface Source Property Editor- Information and Grid
Panels
Catalog Property catalog names.
Name Name dropdown box. Select the name from the drop down list or by typing the
name into the text box. If the name is found in the database its data is dis-
played.
Description The description contains notes about the Surface Source Property.
Spectral Type The Spectral Type displays the choice made when Adding the property. For
types other than Table, additional data fields are available to specify the spec-
trum.
Angular Type The Angular Type displays the choice made when Adding the property. For
types other than Table, additional data fields are available to specify the angu-
lar shape.
Emission The Emission specifies how much total flux or irradiance/illuminance will be
emitted by the source. The choices for units of the source are Radiometric
Flux (Watt), Photometric Flux (lumen), Radiometric Irradiance (W/m^2) or
Photometric Illuminance (lux).

Create a New Surface Source Property


The steps listed below show the method to create a new property with the Surface
Source Property editor.

3.18 TracePro 2022 User’s Manual


Surface Source Properties

1. Select Define|Edit Property Data|Surface Source Properties to open


the Surface Source Property Editor window. Select the Catalog to which you
would like to add the property, or click Add Catalog to add a new one.
2. Click Add Property.
3. Enter a name for the new property, and select the Spectral Type and Angular
Type, then click OK.
4. Edit the data in the top pane and the spreadsheet by selecting a value and
typing in a changed value. For a Table Spectral or Table Angular type property,
add new wavelengths and angles using the Add... button in the Data Points
box.
5. Select Save from the file menu, or close the Surface Source Property editor
and answer Yes to the question “property has changed, save data?”

Edit an Existing Surface Source Property


The steps listed below show the method to edit an existing property in the Surface
Source Property editor.
1. Select Define|Edit Property Data|Surface Source Properties to open
the Surface Source Property Editor window.
2. Select the catalog and name of the property you wish to edit, and select
Unlock. You cannot make changes without unlocking the property for editing.
Properties supplied with TracePro are Read Only and cannot be unlocked or
edited.
3. Make your changes and then select Save from the file menu, or close the
Surface Source Property editor and answer Yes to the question “Property has
changed, save data?”
4. Check the edited property. The updated property is now available in the
Surface Source Property database for future use.

Export a Surface Source Property


The steps listed below show the method to export an existing property within
Surface Source Properties.
1. Select Define|Edit Property Data|Surface Source Properties to open
the Surface Source Property Editor window.
2. Choose a surface source property catalog and name from the drop-down lists.
3. Select File|Export Property to create a text file that contains the
information that defines the selected surface source property. The dialog box
prompts you to enter the name and location of the file. For more information
about “Gradient Index Property Format”, see page 7.99.

Import a Surface Source Property


The steps listed below show the method to import an existing property within
Surface Source Properties.
1. Select Define|Edit Property Data|Surface Source Properties to open
the Surface Source Property Editor window.

TracePro 2022 User’s Manual 3.19


Defining Properties

2. Select File|Import Property to import a text file (in the proper format) with
the definition of a surface source property. The dialog box prompts you to enter
the name and location of the file to import.

Using The Surface Source Property Generator


The Surface Source Property Generator allows you to create a Surface Source
Property from published data for source emission versus direction and
wavelength. The Surface Source Property Generator has its own help system. To
open the Surface Source Property Generator, select Define|Generate
Property Data|Surface Source Property.

Gradient Index Properties Standard Expert

Gradient Index (GRIN) Properties describe materials with indices of refraction that
are not constant over the extent of the object. Examples include glass lenses in
which the index varies from the edge to the center (e.g., as seen in some
eyeglasses) or optical fibers that vary the index across the cross section (e.g.,
step or gradient optical fiber). Such materials are made via a number of different
methods including diffusion, sol-gel, and melding.
The gradient index varies the index of refraction along a parametric profile.
Gradient index properties are identified by name and stored in a database. The
Gradient Index Property editor allows you to edit gradient index properties or
create new gradient index properties. For more information about “Gradient Index
Profile Polynomials”, see page 7.9.
Note: GRADIUM, one of the types in the Type dropdown box of the Gradient
Index Property Editor, must be treated differently. GRADIUM is a trademark of a
company with a unique treatment of data. Unlike others, the GRADIUM Gradient
Index includes material property data and does not require association with a
material property. In cases like this one, Do NOT Apply a material property to
anything of the type Gradium.
For all other Gradient Index properties, you must apply a material property to
supply the base index of refraction. For example, an Axial-Radial profile can be
defined with the data shown in Figure 3.11.

Gradient Index Property Editor


In TracePro, a material’s GRIN properties are identified by a name and stored in a
database.
The Gradient Index Property editor lets you edit all the GRIN properties that exist
in the GRIN property database or create new GRIN properties.
To open the GRIN editor, select Define|Edit Property Data, then select
Gradient Index Properties. Instead of opening as a dialog box, the editor
opens as a window. You can return to the model window by selecting the model
item from the Window menu.
Note: The menu bar displays a different set of options when you are in the editor
window. Once you are in the Gradient Index Property Editor window, you can
return to the model window by selecting the model item from the Window menu.

3.20 TracePro 2022 User’s Manual


Gradient Index Properties

FIGURE 3.11 - The Gradient Index Property Editor

TABLE 3.8. Fields in the Gradient Index Property Editor- Information and Grid
Panels
Catalog Property catalog names.
Name Gradient Property Name dropdown box. Select the name from the drop down
list or by typing the name into the text box. If the name is found in the database
its data is displayed.
Description The description contains notes about the Gradient Property.
Type The Type describes the Gradient Index Profile selected when the property was
defined. See “Gradient Index Profile Polynomials” on page 7.9.
Coefficients Each Gradient type has an associated set of coefficients corresponding to the
Profile Polynomial.

Create a New Gradient Index Property


The steps listed below show the method to create a new property within Gradient
Index Properties
1. Select Define|Edit Property Data|Gradient Index Properties to open
the Gradient Index Property Editor window.
2. Select Add Property.
3. Enter a name for the new property, enter a type or select one from the
dropdown box, and enter a value for the initial wavelength.
4. Edit the coefficients in the spreadsheets by selecting a value and typing in a
changed value.
5. Select Save from the file menu, or close the Gradient Index Property editor
and answer yes to the question “property has changed, save data?”

TracePro 2022 User’s Manual 3.21


Defining Properties

Edit an Existing Gradient Index Property


The steps listed below show the method to edit an existing property within
Gradient Index Properties.
1. Select Define|Edit Property Data|Gradient Index Properties to open
the Gradient Index Property Editor window.
2. Select Unlock. You cannot make changes without unlocking the property for
editing. Properties supplied with TracePro are Read Only and cannot be
edited.
3. Select save from the file menu, or close the Gradient Index Property editor and
answer yes to the question “property has changed, save data?”
4. Check the edited property. The updated property is now available in the
Gradient Index Property database for future use.

Export a Gradient Index Property


The steps listed below show the method to export an existing property within
Gradient Index Properties.
1. Select Define|Edit Property Data|Gradient Index Properties to open
the Gradient Index Property Editor window.
2. Choose a gradient index property from the drop-down list.
3. Select File|Export Property to create a text file that contains the
information that defines the selected gradient index property. The dialog box
prompts you to enter the name and location of the file. For more information
about “Gradient Index Property Format”, see page 7.99.

Import a Gradient Index Property


The steps listed below show the method to import an existing property within
Gradient Index Properties.
1. Select Define|Edit Property Data|Gradient Index Properties to open
the Gradient Index Property Editor window.
2. Select File|Import Property to import a text file (in the proper format) with
the definition of a gradient index property. The dialog box prompts you to enter
the name and location of the file to import.

3.22 TracePro 2022 User’s Manual


Surface Properties

Surface Properties
Surface properties define the absorptance, BRDF, BTDF, specular reflectance and
transmittance at a surface. In TracePro, surface properties are identified by name
and catalog, and are stored in a database.
For detailed descriptions of the components of surface properties such as BRDF
and BTDF. For more information about “BSDF”, see page 7.15.

Using the Surface Property Database


A database filled with predefined surface properties exists as a resource in
TracePro. You can add your own surface properties using the Surface Property
editor. The editor is a separate window. Once you are in the Surface Property
window, you can return to the model window by selecting it from the Window
menu.
To edit the records in the Surface Property Database, select Define|Edit
Property Data|Surface Properties.

• The Surface Property Editor lets you modify the data type, description, and
data entries of existing user-defined properties.
• The editor is a spreadsheet-style window that displays a row of data for each
incident angle, wavelength and temperature.
• Data can be entered for multiple wavelengths, temperatures, and angles of
incidence. TracePro performs a linear interpolation between wavelengths,
temperatures, and angles during a raytrace for tabular data.
• The name and catalog of the surface property is applied to model data and
provides a reference for looking up the data from the TracePro property data-
base.
• Surface properties can be entered using several types of data. See Table 3.10,
“Surface Property Types,” on page 3.26.
• Scattering, or BSDF data, may be entered for surfaces based on any of sev-
eral scattering models. Scattering for transmission (BTDF) and reflection
(BRDF) is entered in the data table for each temperature, wavelength, and
angle of the surface property. For more information about “BSDF”, see
page 7.15.

Using the Surface Property Editor


Select Define|Edit Properties|Surface Properties to open the editor
window.
The surface property editor has several entries as described in the sections that
follow. Notably, under a single name, you can enter properties for multiple
temperatures, wavelengths and angles of incidence.

TracePro 2022 User’s Manual 3.23


Defining Properties

TABLE 3.9. Fields used in the Surface Property Information Panel


Catalog Name of property catalog selected from dropdown list.
Name Select a name from the Name: dropdown list or enter the name of a surface
property not included in the data. The name of the surface property serves as
its reference in all parts of TracePro. If the name you type matches the name
of a coating in the database, its data displays in the spreadsheet part of the
Surface Property Editor. When you add a new surface property, you are first
prompted for its name, because this is the minimum amount of data needed to
define a surface property.
Description The description is optional. It provides a place to describe a surface property
more fully than you can using the name.
Type Choose from the following dropdown list: Fresnel, Table, Stack, Grating, Aniso-
tropic or Coating DLL. As you define a new property, the type ‘Table’ is dis-
played by default and the field ‘Solve For’ is activated to await a selection of
values to calculate. See Table 3.10, “Surface Property Types,” on page 3.26.
Scatter This displays the scatter model used by the property. The scatter model is
selected when the property is created by a selection in the Add Property dia-
log.
Retroreflec- Place a check in this check box to give a surface the property of retroreflec-
tion tance instead of transmittance. When you define a new surface property, the
Retroreflector box is unchecked by default. To create a surface property that
models a surface as being retroreflecting, check the Retroreflector box [Note:
Retroreflector is not available with Grating type]. If you place a check in the
Retroreflector check box, the columns for Specular Transmittance and BTDF
change to Specular Retroreflectance and BRRDF (Bidirectional Retroreflec-
tance Distribution Function). That lets you enter the specular retroreflection
coefficient as well as scattering that is referenced to the retroreflection direc-
tion. No transmission is allowed for a retroreflecting surface.Beware that the
BRRDF is really a contributor to the total BRDF of the surface property. The
real total BRDF of the surface is equal to the sum of the TracePro BRDF and
BRRDF.
Polarization Place a check mark in this check box to display polarization terms. This adds
columns for S and P polarization, and Phase data for the specular components
Standard of the property.
Expert

Stack The Stack drop down list provides a selection of available Thin Film Stack defi-
nitions. This is shown for Stack type surface properties. You need to define a
Standard stack using the Stack Editor before it can be used with a surface property. See
Expert “Thin Film Stacks” on page 3.43.

Spacing For Grating surface properties, a Spacing entry is displayed to provide the
grating spacing of the property.
Standard

Expert

Side 1/2 Mate- Used for Direction-sensitive properties. This defines the Material to be applied
rial Property to each side of the property. The Property values are entered in a Side 1 and
Side 2 panel to define the behavior of the surface depending on which side is
Standard struck by the ray.
Expert

DLL Name For Coating DLL surface types, a DLL Name and Browse button is displayed
to provide the path and file name of the used defined coating DLL. See “User
Expert Defined Surface Properties” on page 7.28.

3.24 TracePro 2022 User’s Manual


Surface Properties

The following table describes the types of surface properties supported by


TracePro.

TracePro 2022 User’s Manual 3.25


Defining Properties

TABLE 3.10. Surface Property Types


Fresnel The Fresnel type assumes that no coating is applied to the surface and that
TracePro uses the material property data of the object(s) on either side of the
surface to calculate Fresnel reflection and transmission. Scatter data may be
included. Use the Fresnel type for an uncoated, polished optical surface with
scattering due to microroughness, i.e. scattering that obeys shift-invariance.
This Surface Property type is not intended, and does not work correctly, for dif-
fuse surfaces. See “Calculation of Fresnel coefficients during raytrace” on
page 7.26 for further discussion on this topic.
Table The Table type stores data in tabular form for various incident angles, wave-
lengths and temperatures. The reflectance and transmittance may be entered
with or without polarization terms. Scatter terms may be included and the data
can use the Solve For functions. Typically tabular data comes from measure-
ments.
Stack The Stack type calculates the specular data using a thin film stack and the
material property data of the objects on either side of the surface. Polarization
Standard effects are included in the stack calculation. Scatter data may be added in tab-
Expert ular form in the Grid Panel. See “Thin Film Stacks” on page 3.43.

Grating The Grating type is like the Table type, except that the specular reflection and
transmission entries are calculated from reflected and transmitted grating effi-
Standard ciencies, entered in the Grid Panel of the editor. Rays are split for each of the
Expert defined grating orders. Scatter data may be included and the data can use the
Solve For functions. Grating parameters can also be imported from GSolver1.
Since the Grating type allows for the entry of azimuthal angles, anisotropic
gratings can be defined.
Direction  This type allows surface properties that will have different behavior depending
Sensitive on which side is struck by the ray. Each side of the property has a Material
Property assigned and includes an input tab to define the property values for
Standard the respective surface side designated as Side 1 and Side 2. See “Direction-
Expert Sensitive Properties” on page 3.28. Since the Direction Sensitive type allows
for the entry of azimuthal angles, anisotropic surfaces can be defined.
Anisotropic The Anisotropic type is entered in tabular format and includes one or more azi-
muthal angles for each incident angle, wavelength and temperature. Scatter
Standard data may be included and the data can use the Solve For functions. See
Expert “Anisotropic Surface Properties” on page 7.26.

Coating DLL This type uses a user supplied DLL to calculate the specular components of
the property. Scatter data may be included in the Grid Panel. See “User
Expert Defined Surface Properties” on page 7.28.

1. GSolver (http://www.gsolver.com/gsprod.html) is a diffraction grating design and analysis software


program produced by Grating Solver Development Co. GSolver now includes an option to export a Tra-
cePro grating type surface property which can then be imported into TracePro. See “Importing a Sur-
face Property” on page 3.30.

3.26 TracePro 2022 User’s Manual


Surface Properties

TABLE 3.11. Selections for Scatter Model


ABg A three-parameter mathematical model for rotationally-symmetric BSDF.
Elliptical ABg An asymmetric, elliptically-interpolated ABg scatter model.
Elliptical A product of two Gaussian functions in orthogonal directions. A circular
Gaussian Gaussian can also be made, by setting the two variance values equal to each
other.
Table BSDF A rotationally-symmetric BSDF model with a table of BSDF values versus |-
0|.
Asymmetric A completely asymmetric BSDF model, the most general that TracePro offers.
Table BSDF Enter a table of values versus radial and azimuthal components of -0.
1D ABg A BSDF model with biaxial symmetry, it is a product of an ABg model in the
local x direction and a Gaussian in the local y direction, used for modeling sur-
faces that scatter light into a narrow slice of the scattering hemisphere.
1D Table Similar to the 1D ABg model, local-x-direction behavior is determined by a
table of BDSF values. The table allows for positive and negative values of (-
0)x to enable asymmetry along the local x axis.
Use BSDF Use one or more BSDF properties from the BSDF database instead of explic-
Properties itly defining the BSDF within the surface property.

FIGURE 3.12 - The Surface Property Editor

Using Solve for


Solve for: uses values on the editor spreadsheet to find the value specified in the
Solve for: dropdown list. To be correct, the values must conform to the law of
conservation of energy—absorptance, specular reflectance, specular
transmittance, integrated BRDF, and integrated BTDF must total 1. TracePro will
not allow you to save a property that does not conserve energy.

TracePro 2022 User’s Manual 3.27


Defining Properties

‘Solve For’ is available for Table, Anisotropic and Grating type properties only. If
the Type: field is set to “Table”, “Anisotropic” or “Grating”, then the Solve for: field
is active.
With Table and Anisotropic types, select Solve for: to derive one of the following
values:
• Absorptance
• Specular reflectance
• Specular transmittance
• BRDF
• BTDF (or BRRDF)
With Grating type, select Solve for: to derive one of the following values:
• Absorptance
• BRDF
• BTDF
Note that NONE is also available on the Solve for: dropdown list. If you select
NONE and type in values that do not compute, you cannot close the editor. It
prompts you with a message. If absorptance is set to 0.3 and all other values are
zero, a message displays. Even with the solve feature turned off, the editor notes
whether or not the numbers’ sum is 1.

FIGURE 3.13 - Conservation Warning Dialog.

For example, if you are developing a new surface property for a mirror, it is likely
that you know the BRDF from measured data, and you also know the
absorptance, perhaps from published data or from measurements. To enter the
complete surface property, you do the following:
1. Enter BRDF A, B and g according to your measurements.
2. Enter the Absorptance.
3. From the Solve for drop-down box, select Reflectance.
Once you select Reflectance, the specular reflectance entry is updated.

Direction-Sensitive Properties
“Direction-Sensitive” surfaces offer an added level of flexibility to Surface
Properties. When defining the property, you must select the medium on Side 1
and Side 2:
NOTE: When a material property of “<None>” is desired, it does not matter which
catalog is used. i.e. Schott | <None>, OHARA | <None>, and HOYA | <None> are
all equivalent

3.28 TracePro 2022 User’s Manual


Surface Properties

• When creating a “Direction-Sensitive” surfaces, you supplie a Material Prop-


erty for Side 1 and a Material Property for Side 2 - this is defined to match the
grating efficiencies to media on the two sides of the interface.
• When raytracing, TracePro uses this information to determine which set of effi-
ciencies (Side 1 or Side 2) to use when a ray is incident on a surface.
• At the point of surface intersection, TracePro checks to see if the incident
medium is one of the two media assigned to the property.
1. If the incident media does not match either of the material properties
defined, TracePro warns you and notifies you that the Side 1 data will be
used.
2. If TracePro finds a match, TracePro will use the side that matches
• TracePro will also check the medium on the on the other side of the intersec-
tion (the transmission side).
1. If the transmission side does not match, TracePro displays a warning in
the Message Window
2. If the transmission side matches, no warning is needed - the model is set-
up as intended
For Direction-Sensitive surfaces, the Surface Property editor includes a separate
page for entering the efficiencies of each side (see tab for Side 1 and Side 2 at
bottom of Surface Property Editor Window).
The Temperatures, Wavelengths, Incident Angles, Azimuth Angles, and Grating
Orders are all kept in sync between the two Sides of the property. When any of
these parameters are added to the property, they are simultaneously added to
both sides

Creating a new surface property


The steps listed below show the method to create a new property within Surface
Properties.
1. Select Define|Edit Property Data|Surface Properties to open the
Surface Property editor window.
2. Choose a catalog from the catalog dropdown list.
3. Click on Add Property, enter a name for your new property and values for initial
angle and initial wavelength.
4. Edit the other values simply by selecting a value and making changes.
5. Select File|Save from inside the Surface Property editor window or close the
Surface Property editor and answer yes to the question “property has
changed, save data?” Your new property is now available in the Property
Database for future use.

Editing an Existing Surface Property


The steps listed below show the method to edit an existing property within Surface
Properties.
1. Select Define|Edit Property Data|Surface Properties to open the
Surface Property editor window.
2. Choose a catalog from the catalog dropdown list.
3. Choose the name of your property from the dropdown name catalog.

TracePro 2022 User’s Manual 3.29


Defining Properties

4. Press on the Lock icon in the Toolbar to enable editing. You cannot make
changes to a property that is Read Only. Pre-defined manufacturer properties
cannot be edited unless you export them to text format, change their status to
user defined, and re-import them into TracePro. See the Surface Import/Export
Format Help topic for most up-to-date information.
5. Select the values you want to change and enter the new data.
6. Select File|Save or close the Surface Property editor and answer yes to the
question “property has changed, save data?” The edited property is now
available in the Surface Property database.

Exporting a Surface Property


The steps listed below show the method to export an existing property within
Surface Properties.
1. Select Define|Edit Property Data|Surface Properties to open the
Surface Property editor window.
2. Choose a catalog from the catalog dropdown list.
3. Choose the name of your property from the dropdown name catalog.
4. Use the File|Export Property command to create a text file that contains
the information for the selected surface property. The dialog box prompts you
to enter the name and location of the text file you will create. You can find out
more about the format used by TracePro for these files by referring to the
Surface Import/Export Format section in the TracePro help file. The exported
file is a tab-delimited text file that can be opened with a spreadsheet program.

Importing a Surface Property


The steps listed below show the method to import a property within Surface
Properties.
1. Select Define|Edit Property Data|Surface Properties to open the
Surface Property editor window.
2. Use the File|Import Property command to import a text file (in the proper
format) that contains the information for a surface property. The dialog box will
prompt you to enter the name and location of the file to import. You can find out
more about the format used by TracePro for these files by referring to the
Surface Import/Export Format section in the TracePro help file.

Surface Property Plot Tab


The Surface Property Plotter evaluates the optical properties of a surface. Many
properties vary due to wavelength, angle or other parameter. The Property Plotter
provides visualization of such properties with options to define the display
parameters. You can make plots of performance versus wavelength or angle of
incidence. The plotter is independent of the TracePro model and can be used to
perform “What if” studies to evaluate different combinations of surface properties.
In Figure 3.14, you see a plot of an AR coated piece of Schott BK7 glass
measured vs. wavelength.

From the Surface Property Editor, click on the Plot tab in the editor. The selected
property will be displayed for the current set of plot options.

3.30 TracePro 2022 User’s Manual


Surface Properties

FIGURE 3.14 - Surface Property Editor Window

To modify the display parameters or materials used in the calculation, select the
Plot Options button to modify the plot parameters.

FIGURE 3.15 - Surface Plot Options Dialog

TracePro 2022 User’s Manual 3.31


Defining Properties

Incident Medium
Select a material that is an interface to one side of the surface property to be
plotted. This selection specifies what the light ray travels through before reaching
the surface.
Catalog Select an appropriate catalog of optics materials from the dropdown list. This
box is grayed out if the Air check box contains a check mark.

Name Select an incident medium property name from the dropdown list. This box is
grayed out if the Air check box contains a check mark.

Air Place a check mark in the Air check box if there is no object in the path of the
light ray before it reaches the surface property to be plotted.

Substrate Medium
Select a substrate medium material property by selecting a catalog and a name,
or select Air to indicate that no object or interface exists on the side of the surface
property where light rays exit.
Catalog Select an appropriate catalog of optics materials from the dropdown list.

Name Select the name of the substrate medium from the Name dropdown list.

Air Select Air by placing a check mark in the Air check box indicating that no
object or interface exists on the side of the surface property where light rays
exit.

by angle (deg)
Enter the angle range in degrees and a wavelength in microns.

from Enter the beginning of the angle range [any number 0-90].
to Enter the end of the angle range [any number 0-90]
wave (um) Enter a wavelength.

by wavelength (um)
Enter the wavelength range and an angle.
from Enter the start number of the wavelength range.
to Enter the end number of the wavelength range.
angle Enter an angle [any number 0-90].

3.32 TracePro 2022 User’s Manual


Surface Properties

Display Values
Select the curves to plot. Polarization and temperature can modify the curves
dependent on the level of data entered for these parameters. Without polarization
selection, some curves cannot be plotted.
Polarization Select by checking one or more check boxes for Ave (Average), S (S-axis),
and P (P-Axis).
Curves Select by checking one or more check boxes for Refl (Reflection), Tran (Trans-
mission), and Abso (Absorption).
Temperature Type the Temperature in Kelvin into the text entry box.
Range Enter the minimum and maximum values for the vertical axis of the plot.

Table BSDF Expert

TracePro supports two types of tabular BSDF models: Table BSDF and
Asymmetric Table BSDF. To use the Table BSDF model, you enter a table of
BSDF values versus the radial component of |-0|. See “Harvey-Shack BSDF”
on page 7.16. During the ray-trace, TracePro linearly interpolates between the
tabulated values. To use the Asymmetric Table BSDF model, you enter a two-
dimensional table of BSDF versus the radial and azimuthal components of |-0|.
During the ray-trace, TracePro bilinearly interpolates the two-dimensional table to
determine the BSDF. Selection of a Table BSDF model is independent of whether
the TracePro Surface Property is anisotropic.

Creating a Table BSDF Property


To create a surface property with Table BSDF:
1. Select Define|Edit Property Data|Surface Properties to open the
Surface Property editor window.
2. Choose a catalog from the catalog dropdown list.
3. Click on Add Property. When the Enter New Surface Property dialog box is
displayed as shown in Figure 3.16, select Table BSDF from the Scatter Model
list, enter a name for your new property and values for initial angle and initial
wavelength, then click OK.
4. Edit the other values simply by selecting a value and making changes.
5. Select File|Save from inside the Surface Property editor window or close the
Surface Property editor and answer yes to the question “property has
changed, save data?” Your new property is now available in the Property
Database for future use.

TracePro 2022 User’s Manual 3.33


Defining Properties

FIGURE 3.16 - Selecting Table BSDF from the Scatter Model list in the Enter
New Surface Property dialog box.

The new Table BSDF surface property will be displayed in a spreadsheet as


shown in Figure 3.17.

FIGURE 3.17 - Surface Property editor created with Table BSDF type.

On the right side of the spreadsheet are columns for Scatter Beta, BRDF, and
BTDF. The Scatter Beta column provides values of |-0| for tabulating both the
BRDF and the BTDF. These values are independent of the Incident Angle values
for the surface property. The first row for a provided incident angle (shown in the
3rd Column) provides the integrated BRDF and BTDF for this angle. The
integrated BRDF and BTDF is the total scattered flux into a hemisphere from the
surface normal. The rows following the integrated amount represent |-0| values
and the respective BRDF and BTDF at these angular offsets from the specular
direction. See page 7.15 for more details about this process.

3.34 TracePro 2022 User’s Manual


Surface Properties

To add more |-0| rows, click Add to open the Surface Property – Add Data
Dialog dialog box as shown in Figure 3.18. Select Scatter Beta, enter the |-0|
value in the dialog box (the value 0.01 is shown) and click OK.

FIGURE 3.18 - Adding a new value of |-0| to the BSDF table.

You can add as many Scatter Beta values as you wish. You may find it easier to
create a template for the Table BSDF property and export it to a text file, fill in the
BSDF values, and import the property. This is usually easier than typing in all the
BSDF values in the Surface Property spreadsheet. This requires nine steps:
1. Create a Table BSDF surface property with a value of |-0|. Add some of the
data that will be needed by the property. This data will act as a template in the
following steps.
2. Save the property into the database using File|Save.
3. Export the property to a text file using File|Export. The result is a tab-
delimited text file, which works best with spreadsheet programs such as
Microsoft Excel.
4. Import the file into a spreadsheet program like Excel. (Figure 3.19 shows our
example property imported into Excel. There are more columns to the right in
the property, but we do not need to view them for our example.)
5. Fill in new values for Scatter Beta, BRDF, and BTDF per your available data.
Figure 3.20 shows our example with BRDF data only, suitable for a mirror.
6. Save the text file and close Excel.
7. Import the text file in the Surface Property Editor using File|Import, as
shown in Figure 3.21.
8. Enter values for the other property table coefficients, e.g. absorptance,
specular reflectance and specular transmittance.
9. Use the Solve for feature, if necessary, to make the property conserve energy.
The completed example surface property is shown in Figure 3.22.

TracePro 2022 User’s Manual 3.35


Defining Properties

FIGURE 3.19 - Table type surface property with Table BSDF model after
importing into Excel.

3.36 TracePro 2022 User’s Manual


Surface Properties

FIGURE 3.20 - Surface property after filling in example values for |-0| and
BRDF.

TracePro 2022 User’s Manual 3.37


Defining Properties

FIGURE 3.21 - Example table BSDF after importing back into the Surface
Property Editor. TracePro has computed the Integrated BRDF.

FIGURE 3.22 - Table BSDF surface property after entering 0.05 for
absorptance and solving for Reflectance. The property is complete and
ready for use.

You can use the Solve For feature to compute the BRDF and BTDF with a Table
BSDF model, but you must enter factors into each of the BRDF or BTDF cells.
These factors represent the ratio of the actual BRDF or BTDF values in the cells
upon computation due to the Solve For. This process will ensure energy
conservation while allowing you to ignore the complexity of doing the rigorous
calculations.

3.38 TracePro 2022 User’s Manual


Surface Properties

Creating an Asymmetric Table BSDF Property


To create a surface property with Asymmetric Table BSDF:
1. Select Define|Edit Property Data|Surface Properties to open the
Surface Property editor window.
2. Choose a catalog from the catalog dropdown list.
3. Click on Add Property. When the Enter New Surface Property dialog box is
displayed as shown in Figure 3.23, select Asymmetric Table BSDF from the
Scatter Model list, enter a name for your new property and values for initial
angle and initial wavelength, then click OK.
4. Edit the other values simply by selecting a value and making changes.
5. Select File|Save from inside the Surface Property editor window or close the
Surface Property editor and answer yes to the question “property has
changed, save data?” Your new property is now available in the Property
Database for future use.

FIGURE 3.23 - Selecting Asymmetric Table BSDF from the Scatter Model list
in the Enter New Surface Property dialog box.

The new surface property will be displayed in a spreadsheet as shown in Figure


3.24. For this example we have chosen a Table type surface property, but you can
choose any other property type that you wish.

TracePro 2022 User’s Manual 3.39


Defining Properties

FIGURE 3.24 - Surface Property editor created with Table Asymmetric BSDF
type.

The first row for a provided incident angle (shown in the 3rd Column) provides the
integrated BRDF and BTDF for this angle. The integrated BRDF and BTDF is the
total scattered flux into a hemisphere from the surface normal. The rows following
the integrated amount represent |-0| values, azimuth angles and the respective
BRDF and BTDF at these angular offsets from the specular direction. See page
page 7.15 for more details about this process.
To add more |-0| or scatter azimuth values, click Add to open the Surface
Property – Add Data Dialog dialog box as shown in Figure 3.25. Select Scatter
Beta or Scatter Azimuth, enter the value in the dialog box (the value |-0| = 0.01
is shown) and click OK. Like all data in the TracePro database, the data is laid out
in a rectangular array. That is each time you enter a new value of Scatter Beta,
TracePro fills in all the values of Scatter Azimuth for the new beta value.
Conversely, when you enter a new azimuth, TracePro fills in all the beta values.
Therefore if you enter M values of beta and N values of azimuth, there will be MxN
rows in the table.

3.40 TracePro 2022 User’s Manual


Surface Properties

FIGURE 3.25 - Adding a new value of |-0| to the BSDF table.

You can add as many Scatter Beta and Scatter Azimuth values as you wish. You
may find it easier to create a template for the Asymmetric Table BSDF property
and export it to a text file, fill in the BSDF values, and import the property. This is
usually easier than typing in all the BSDF values in the Surface Property
spreadsheet. For instructions on doing this, see the example in the Table BSDF
section above.

Using an Asymmetric Table BSDF property


To use a Surface Property with Asymmetric Table BSDF, simply apply the property
to a surface in the usual way. You will have to specify the orientation vectors the
same way as for an Elliptical ABg BSDF Surface Property or an Elliptical
Gaussian BSDF Surface Property. For more information about “Surface
Properties”, see page 4.10.

Using The BSDF Converter


The BSDF Converter enables you to import measured BSDF data from a variety
of file formats and create a surface property based on that data.
The BSDF Converter can import any of the following file formats:

• FRED file (*.txt)


• Radiant Imaging IS-SA file (*.bsdf)
• Radiant Imaging Imaging-Sphere file (*.txt)
• Scattermaster file (*.csv)
• ALANOD file (*.txt, *.ind)
• SPEOS file (*.bsdf)
• opsira file (*.csv)
• Ophir binary (*.prw)
• Oxytech File (*.csv)

TracePro 2022 User’s Manual 3.41


Defining Properties

• PIDC File (*.xls)


• LTW File (*.ltw)
• TracePro Candela File (*.txt)
• CASI and ASTM File

The converter can export the data as either an ABg Model or an Asymmetric Table
BSDF type TracePro Surface Property. To open the BSDF Converter, select
Define|Generate Property Data|BSDF. The BSDF Converter has its own help
system.

Using BSDF Properties


When creating a surface property, you can elect to use one or more BSDF
Properties from the BSDF database instead of explicitly defining them in the
surface property.

Creating a Surface Property using BSDF Properties


To create a surface property using BSDF Properties:
1. Select Define|Edit Property Data|Surface Properties to open the
Surface Property editor window.
2. Choose a catalog from the catalog dropdown list.
3. Click on Add Property. When the Enter New Surface Property dialog box is
displayed as shown in Figure 3.16, select Use BSDF Properties from the
Scatter Model list, enter a name for your new property and values for initial
angle and initial wavelength, then click OK.
4. Edit the other values simply by selecting a value and making changes.
5. Select the BSDF Property tab and choose the Catalog and Name in the grid of
the BSDF Property you would like to use. To add more properties, click the
Add... button.
6. Select File|Save from inside the Surface Property editor window or close the
Surface Property editor and answer yes to the question “property has
changed, save data?” Your new property is now available in the Property
Database for future use.

3.42 TracePro 2022 User’s Manual


Thin Film Stacks

Wire Grid Polarizers Expert

Lambda Research has written dynamic-linked libraries (DLLs) to incorporate data


obtained from MOXTEK, Inc. for their current line of wire grid polarizers. For
further detailed information on these polarizers, please contact MOXTEK directly
at www.moxtek.com.
The TracePro surface property information is contained in the following files:
• The Moxtek properties are included in the default property database shipped
with TracePro.
• Surface Properties\Moxtek\PBFxx.dll (Data DLLs, one for each type of wire
grid polarizer). You must download these from www.lambdares.com, in the
TracePro Technical Support section, on the Properties page. After you have
downloaded the zip file, you can keep the DLLs in any convenient folder.
• Surface Properties\Moxtek_SurfacePropertyCatalog.txt on
www.lambdares.com contains a concatenated file of the surface properties
associated with the Data DLLs. You should not need to use this file except for
upgrading very old TracePro database installations.
The surface properties refer to a <TBD> location for their respective DLL. To use
these surface properties, you must first edit the Surface Property, specifically the
location of DLL file. Open and unlock the property in the Surface Property Editor,
then edit the DLL name. You can browse to the location or simply type it in the text
box.

Applying Wire-Grid Surface Properties


After putting the wire-grid surface properties into your database, apply these
properties in the standard way in TracePro – via the Apply Properties dialog box’s
Surface tab.
When applying these properties you will also be prompted for location and
orientation information. This is accomplished by supplying the x, y, and z
components of the Origin, Normal Direction, and Up Direction.
The Origin locates the property in 3D space.
The Normal Direction can be considered the local z direction and designates the
propagation direction through the polarizer.
Finally, the Up Direction can be considered the local y direction and designates
the direction of the wires of the wire-grid polarizer.
Once this location and orientation information is applied to the surface,
subsequent moving or rotating of the TracePro object will automatically update
this information to simulate the actual re-orientation of such a component as if on
an optical bench.

Thin Film Stacks Standard Expert

TracePro uses Thin Films to calculate the specular properties of dielectric multi-
layer stacks. The Thin Film calculations in TracePro assume a coherent plane
wave of light and follow the theory from Born & Wolf section 1.6.3 (7th expanded
edition, Cambridge, 1999). Grazing incidence is not a "special case,” so the
calculations are valid for all angles of incidence, provided the "coherence
assumption" holds.

TracePro 2022 User’s Manual 3.43


Defining Properties

Thin Films work in conjuction with the Material Properties for the index and
absorption coefficients, the Stack Editor to define the layers of the film and with
the Surface Properties as a component of a Surface Propety. You can not directly
apply a Thin Film to a surface in TracePro rather you apply a Surface Property
that contains a Thin Film. The Stack Editor is shown in Figure 3.26.
If the materials are entered with wavelength and temperature dependence, the
stack and subsequent surface property is fully dispersive.
Any number of layers may be used to define a Thin Film Stack. The thickness
should be greater than zero but if a zero thickness is entered the layer is
effectively removed from the stack during evaluation.

Using the Stack Editor


The Stack Editor provides a means to add or change the various layers to a stack.
Select Define|Edit Properties|Thin Film stacks to open the Stack Editor
window.
Stacks are entered like a table with the first layer, the top row, in contact with the
incident medium and the last layer, the bottom row, in contact with the substrate
medium. The substrate medium corresponds to the Object that the Surface
Property is applied to.
TracePro stacks are constructed using the Material Properties database. Any
material defined in the various material catalogs can be inserted as a layer. Each
stack layer also requires a thickness (in microns).
TABLE 3.12. Fields in the Stack Editor Information and Grid Panels
Catalog Name of property catalog selected from dropdown list.
Name Property name selection box. Select a name in the Name dropdown list box or
by typing the name into the Name text box. If the typed name finds a match in
the database, its data is displayed on the spreadsheet.
Description The description is a field for text intended to contain added information about
the property.
Thickness Use this column to accept or edit the physical thickness of the layer in microns.
Material  Use this column to accept or edit the name of an available catalog.
Catalog
Material Name Use this column to accept or edit the name of a material.

Thin Film Stack Editing Note


The thin film stack is a special case because it is subordinate to surface
properties. That is, after creating a stack property with the thin film stack editor,
the next step is to open the surface property editor to use the stack property in a
surface property. In the Surface Property Editor, set the type = stack. You can now
add scatter, which is not available in the Thin Film Stack Editor. By becoming part
of a surface property, the stack property is enhanced with scatter before being
applied to a surface. The sequence of steps is:
1. Create the Stack Property in the Stack Property Editor.
2. Create the Surface Property in the Surface Property Editor. 
Set the type = Stack.
3. Apply the Surface Property to a surface in your model.

3.44 TracePro 2022 User’s Manual


Thin Film Stacks

Entering a Single Layer Stack


Many lenses are coated with a single layer of Magnesium Fluoride (MgF), a
common Anti-Reflection coating in the visible wavelength region. Typically this is
a Quarter Wave Optical Thickness (QWOT) in the center of the visible spectrum.
For maximum transmission at a given wavelength, select a physical thickness of
0.25 /n to achieve a Quarter Wave Optical Thickness.

FIGURE 3.26 - Stack Property Editor

To create a Thin Film Stack:


1. Select Define|Edit Property Data|Thin Film stacks to open the Stack
Editor editor window.
2. Choose a catalog from the catalog dropdown list.
3. Click on Add Property, enter a name for your new property and click OK.
4. Edit the Thicness and Material for each layer in the stack. The data columns
are drop down lists from which a Catalog and THEN Name are selected.
5. Press the Insert or Delete buttons to add/remove layers.
6. Select File|Save from inside the Stack Property editor window or close the
Stack Property editor and answer yes to the question “property has changed,
save data?” Your new property is now available in the Property Database for
future use.
Note: Because the Material Property Database is used, the Stacks are fully
dispersive when the Material Data contains wavelength and temperature data.
After a Thin Film Stack is defined access the Surface Property Editor by selecting
Define|Edit Property Data|Surface Property to define a Surface Property
of type Stack. For more information about “Creating a new surface property”, see
page 3.29.

TracePro 2022 User’s Manual 3.45


Defining Properties

FIGURE 3.27 - Stack Entered Into Surface Property Editor

When the AR Surface Property is applied to an Object made from Schott BK7
glass, we see a reflectance of less than 4% in the visible wavelength range. An
uncoated piece of BK7 has a reflectance of just over 4%. See Figure 3.28 on
page 3.47. The plot is viewed by opening the Plot Tab in the Surface Property
Editor and setting the Plot Options for an Incident Medium of Air and a Substrate
of Schott BK7 glass. For more information about “Surface Property Plot Tab ”, see
page 3.30.

3.46 TracePro 2022 User’s Manual


BSDF Properties

FIGURE 3.28 - Reflectance after the AR Surface Property is Applied to the


Schott BK7 Glass

BSDF Properties
The BSDF Property Editor allows you to make “free-standing” BSDF properties
that are not part of a surface property. BSDF Properties cannot be applied directly
to a surface like a surface property. Instead, they are used to define the scattering
part of a surface property rather than creating the BSDF ad hoc in the surface
property. Using BSDF Properties in a Surface Property gives you added flexibility,
because you can use more than one BSDF property when defining a surface
property. TracePro will add the BSDF properties together to make a composite
BSDF. This allows you, for example, to combine 1D and 2D BSDFs together in
one surface property, or use more than one BSDF model to fit measured data. For
example, the ABg model may not fit your measured data well, but two ABg models
with different coefficients, added together, may work well.
Another advantage of defining BSDF in a BSDF Property instead of a Surface
Property, is that you can use a different set of independent variables in the BSDF
Property. For example, it easy to measure transmittance and reflectance at many
wavelengths using a spectrometer, but BSDF is normally measured at only a few
wavelengths, because BSDF does not typically vary rapidly with wavelength, and
BSDF measurements are expensive for even a few wavelengths.

TracePro 2022 User’s Manual 3.47


Defining Properties

All of the Scatter Model types available in the BSDF Property database are also
available as ad hoc Scatter Models in the Surface Properties database, and vice
versa. For complete descriptions of all the BSDF models supported by TracePro,
see the Technical Reference section.

Using the BSDF Property Editor


The BSDF Property Editor provides a means to add or change a BDSF property.
Select Define|Edit Properties|BSDF Properties to open the BSDF Property
Editor window. To create a new BSDF property, click the Add button and fill in the
items in the Enter New BSDF Property dialog box, as shown in Figure 3.29.

FIGURE 3.29 - Adding a new BSDF Property using the Enter New BSDF
Property dialog box. ABg BSDF is shown.

The BSDF Property Editor is similar in appearance to the Surface Property Editor.
Figure 3.30 shows the Editor displaying a property with an ABg scatter model and
one temperature, wavelength, and incident angle.

FIGURE 3.30 - The BSDF Property Editor with an ABg scatter model and
one wavelength, temperature, and incident angle.

3.48 TracePro 2022 User’s Manual


RepTile Surfaces

To edit an existing property, first select the Catalog and Name from the lists to
display the data for the property you wish to edit. Then click the lock icon in the
toolbar at the top of the Editor window, as described on page 3.3.

Importing and Exporting BSDF Properties


You can import and export BSDF properties as text files using the toolbar icons, in
the same way as for any other property, as described on page 3.3. Properties can
also be exported using the File menu. The File menu also enables you to export a
catalog as a text file.

RepTile Surfaces Expert

Overview
When modeling objects that have many small repeated structures, it is often
infeasible to create the structures using TracePro or any other solid modeling
program. For example, brightness-enhancing films used in flat-panel LCDs may
have thousands or millions of repeated surface structure elements. There are two
ways to model such systems effectively via optical analysis in a timely manner:
inclusion of a BSDF scatter function or implementation of a functional form for the
shape and distribution of the replicated structure. The former is adequate for
systems working in the far field, but for almost all systems it is better to use the
latter functional form. The RepTile surface feature in TracePro accomplishes this
by allowing you to create these objects by specifying the shape of one tile, and the
RepTile feature replicates this shape to create an array of tiles. This feature allows
you to create complicated models with a great reduction in model size, audit time,
and ray-trace time compared to equivalent models with solid geometry.
To see how to define and use RepTile properties see “RepTile Examples” on
page 9.1.

Specifying a RepTile surface


The process of making a RepTile surface in TracePro is analogous to applying a
surface property. TracePro has a database of basic RepTile surface shapes and
geometries, and you can define additional RepTile parameters by adding them to
the database. The database is accessed through the RepTile Property Editor. Dif-
ferent tile shapes (ring, segmented ring, rectangular, staggered rectangular, and
hexagonal) and tile geometries (conical, spherical, hip-roof, cube-corner, prism,
rounded prism, and Fresnel lens) are available. These tile shapes and geometries
are explained in the following sections. In general, the geometries can be defined
as either “bumps” or “holes”.
Once a RepTile property is entered in the database, it can be applied to a plane
surface using the RepTile tab of the Apply Properties dialog box. Additionally,
applying a RepTile requires boundary data for the plane surface within which the
tiles are to exist and the location of a key reference tile (0,0).
When you apply a RepTile surface to a plane surface, TracePro defines a cell
containing the tiled space. The cell has the shape of the boundary (circular,
rectangular, or the boundaries of the surface) and a depth. You must be aware of
the depth calculation because the cell must be completely contained within the
object that owns the RepTile surface. If this rule is violated, incorrect rays result.

TracePro 2022 User’s Manual 3.49


Defining Properties

The orientation of tiles in a RepTile surface is specified by the Up Vector. It defines


the local y axis of the surface, the plane normal vector defines the local z axis, and
the local x axis is orthogonal to the y and z axes and forms a right-handed
coordinate system. The width of tile shapes and geometry is the dimension along
the local x axis and the height is along the local y axis (the Up Vector). Depth/
height of holes/bumps is along the local z axis. Please not that the “Bump” will be
below the selected surface, not above it and external to the object.

FIGURE 3.31 - Orientation of dimensions along the z-axis.

RepTile Shapes
The tile shapes in a RepTile surface can be one of the following:
• Ring
• Segmented Ring (Parameterized Ring tile)
• Rectangular
• Staggered Rectangular
• Hexagonal

3.50 TracePro 2022 User’s Manual


RepTile Surfaces

Ring tiles
Ring tiles are simply concentric rings defined by their width. The central ring tile is
a circle of radius r0. Ring tiles are used for specifying Fresnel lenses. The location
of the (0,0) tile is the center of the rings.

FIGURE 3.32 - Example of ring tiles geometry.

Segmented Ring tiles


Segmented Ring tiles are defined by a radial ring width, an angular segment
width, a starting angle and the number of angular segments per ring. The segment
width and number of segments are independent parameters. If the segment
angular width multiplied by the number of segments is less than 360 degrees,
then TracePro will create a final tile to complete the full 360 degrees. This final tile
will have no Reptile geometry. If the segment angular width multiplied by the
number of segments is greater than 360 degrees, then TracePro will truncate the
tiles and thus the geometry at 360 degrees. Figure 3.33 shows an example of
segmented ring tiles.
See “RepTile Parameterization” on page 3.77 for further discussion on this topic.

FIGURE 3.33 - Example of segmented ring tiles with spherical hole


geometry.

TracePro 2022 User’s Manual 3.51


Defining Properties

Rectangular tiles
Rectangular tiles are rectangular in shape and are laid out in a rectangular array.
Figure 3.34 shows an array of rectangular tiles with conical "bump" geometry.
Rectangular tiles are specified by their height and width.
See “RepTile Parameterization” on page 3.77 for further discussion on this topic.

FIGURE 3.34 - Example of rectangular tiles with conical "bump" geometry.

Staggered rectangular tiles


Staggered rectangular tiles are similar to rectangular tiles except that alternate
rows of tiles are displaced by one-half the tile width, like brickwork. An example of
staggered rectangular tiles with conical "bump" geometry is shown in Figure 3.35.
You specify staggered rectangular tiles by their height and width. Note that for
Constant (C) or Variable Rows (V) variation types, succeeding rows are staggered
by half the tile width. For Parameterized (P) variation type, you must enter the
stagger value with the use of the iRow variable in the Row Offset data entry point.
Failure to do so, results in a non-staggered array of rectangles. This Row Offset
value allows you to vary the stagger as a function of row number, in fact, it can be
nonlinear dependent on the function that you enter for the Row Offset.
See “RepTile Parameterization” on page 3.77 for further discussion on this topic.

3.52 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 3.35 - Example of staggered rectangular tiles with conical "bump"


geometry.

Hexagonal tiles
Hexagonal tiles are packed hexagons, like a honeycomb. The width of a hexagon
is the distance from one flat side to another and lies along the local x-axis as
shown in Figure 3.36. The hexagons are packed with points along the vertical
direction defined by the local y-axis or up vector as shown in Figure 3.36.

width

FIGURE 3.36 - Hexagonal tile with local x and y axes and width parameter

TracePro 2022 User’s Manual 3.53


Defining Properties

FIGURE 3.37 - Example of hexagonal tiles with conical "bump" geometry.

RepTile Geometries
Several geometries are available for defining tiles in RepTile surfaces; more will
be added as TracePro evolves. Most geometries can be defined as either bumps
or holes. Bumps protrude out from the surface and holes protrude into the
surface. Geometry can also vary from one row to the next or from one ring to the
next. Not all geometries are compatible with all tile shapes. The compatibility of
geometry and tile shapes is summarized in Table 3.13 and it includes other facets
of the RepTile interface: "bump"/”hole” compatibility, decenter within the tile,
variance from row/ring, and parametrization capability.
The Tile Shape vs. Geometry portion of the table uses the following legend to
indicate which of the three Variation types is supported:
• C - Constant,
• V - Variable rows,
• P - Parameterized,
• N/A - Not Applicable.
If the cell is left blank, the Shape/Geometry combination is not available.

3.54 TracePro 2022 User’s Manual


RepTile Surfaces

TABLE 3.13 - Compatibility of geometry and tile shapes and also factors
that define the shape and placement of the "bump"/hole.

Tile shape

Decenter Can Vary Can be Ring/ Rectangle/


"Bump"/ within versus para- Segmented Staggered
Geometry Hole tile Row/ring meterized ring rectangle Hexagonal

Fresnel Lens X X X C,V,P

Cone X X X X P C,V,P C

Sphere X X X X P C,V,P C

Ellipsoid X X X X P C,V,P C

Hip Roof X X X X P C,V,P

Prism X X X C,V,P

Rounded
Prism Bump X X C,V,P

Enhanced
Prism X X X X X C,V,P

Log X X X X X C,V,P

Flattened
Cone X X X X X C,V,P C

Pointed Cone X X X X X C,V,P C

Block X X X X X C,V,P C

Chiseled Log X X X X X C,V,P C

Cube Corner Bump C

DMD Mirror X X X X P C,V,P

Torus X X X X P C,V,P C

Asphere X X X X P C,V,P C

Polygon X X X X P C,V,P C

Pyramid X X X X P C,V.P C

Texture File X N/A N/A N/A N/A N/A

Circular Hip
Roof X X X X P C,V,P C

Note: Fresnel lens geometry is described by rings rather than individual bumps or
holes.

TracePro 2022 User’s Manual 3.55


Defining Properties

Most geometry can be parameterized and decentered within the tiles. These
functions are described in “RepTile Parameterization” on page 3.77 and
“Decentering RepTile Geometry” on page 3.82.
It is possible for you to define geometry that will produce incorrect ray-tracing
results. These situations are described as they arise in the following sections.

Fresnel lens geometry


The Fresnel lens geometry is limited to linear facets. The first provides the optical
power for the conical facets, while the second provides for draft facets. The
Fresnel lens geometry has three selections: constant ring, variable rings, or
parameterized rings. With these choices the linear facet angles can be different
or constant for each ring. By specifying the "bump" geometry a Fresnel lens with
positive power is obtained, while the "hole" geometry provides a Fresnel lens with
negative power.
In order to remove the possibility that rays will have undefined behavior at the
boundary of the tiled region, the rings must completely fill the region. The
standard is for centered Fresnel lenses - when the center of the boundary and the
location of the (0,0) tile have the same coordinates. Decentered Fresnel lenses
are created by making these two coordinates different, but as stated previously,
one must ensure that the entire region is filled by the specified rings.
The Fresnel lens geometry and tile shapes must be defined so that they vary
versus ring, and there must be enough rings to completely fill the boundary.
Otherwise, rays will have undefined behavior at the edge of the outermost ring.
To make a centered Fresnel lens, enter the same coordinates for both the center
of the boundary and the location of the (0,0) tile. You can make “decentered”
Fresnel lenses by making the center of the boundary different from that of the
(0,0) tile.

Conical geometry
Conical geometry consists of a truncated cone and an optional chamfer. As shown
in Figure 3.38, you specify the end radius of the cone, the angle of the cone, the
height of the cone, and optionally the height and angle of the chamfer. The cone
and optional chamfer protrude from a base plane. To make conical “bumps” or
“holes” that overlap or “run into” each other, specify a combination of cone radius,
chamfer height, and chamfer angle such that the chamfer does not fit within the
tile. If you choose to do this, the geometry must not vary versus row, or surface
discontinuities will result. Conical geometry can be used with ring, segmented
ring, rectangular, staggered rectangular, or hexagonal tiles.

3.56 TracePro 2022 User’s Manual


RepTile Surfaces

Chamfer height

Cone end Chamfer angle


Cone angle
radius

Cone depth/height

FIGURE 3.38 - Parameters for defining conical geometry.

Spherical geometry
Spherical geometry consists of a spherical "bump" or “hole” and a base plane.
Specify a spherical "bump" by its height above the base plane and the radius of
the sphere. The depth/height of the "bump"/”hole” can exceed the radius allowing
for bubbles or floating spheres respectively. To make spherical bumps or holes
that “run into” each other, e.g., an array of lenslets, specify a height and radius
large enough that the sphere does not intersect the base plane within the tile. The
dimensions needed to specify spherical geometry are illustrated in Figure 3.39.
Spherical geometry can be used with ring, segmented ring, rectangular, staggered
rectangular or hexagonal tiles.

Depth/height

Radius
Sphere radius

Depth/Height

FIGURE 3.39 - Parameters for specifying spherical geometry.

TracePro 2022 User’s Manual 3.57


Defining Properties

Ellipsoid geometry
Ellipsoid geometry consists of a elliptical "bump" or hole and a base plane. The
ellipsoid is defined by three radii along a local x-axis, y-axis, and z-axis. Z is
defined normal to the plane of the surface to which the property is applied. Y is
defined by the Tile Up vector. Three rotations are also available to rotation the
ellipsoid about the x-axis, y-axis and z-axis. Ellipsoid geometry can be used with
ring, segmented ring, rectangular, staggered rectangular or hexagonal tiles.

Y
Rx
X Rotate Y

Rotate X

Ry
Z
Rotate Z

Rz

FIGURE 3.40 - Dimensions for Ellipsoid geometry. The X-Y plane is the base
plane.

The position of the base plane allows control of the height/depth of the ellipsoid
above/below the surface. A positive value for the base plane height positions the
center of the ellipsoid above the surface, while a negative base plane height
positions the center of the ellipsoid below the surface. If the Variation Type for the
property is specified as parameterized, then the base plane height can exceed the

3.58 TracePro 2022 User’s Manual


RepTile Surfaces

Z Radius, so the RepTile feature can be a complete ellipsoid floating above the
surface, or an embedded ellipsoid within the surface. See Figure 3.41.

Positive
Negative
Negative

Base Plane locations

FIGURE 3.41 - Effect of base plane height on Ellipsoid hole geometry.

Hip-roof geometry
The Hip-Roof geometry consists of a pyramid that can come to a point, a linear
edge, or a plateau dependent on its entered parameters, which are:
• the x and y angles, which do not need to be the same,
• the x and y widths of the angled sides, which do not need to be the same,
• the x and y widths of the flat borders, called landings, which do not need to be
the same, and
• the truncation amount to provide a flat roof.
The dimensions needed to specify a hip roof are shown in Figure 3.42, and the
dimensions for a mansard roof are shown in Figure 3.43. If the depth/height
specified for the hip roof geometry is less than the intersection of the angled
planes, the top is truncated and a mansard roof is created. Otherwise, a hip roof is
created. To make tiles that “run into” each other, make the x and/or y border zero.

TracePro 2022 User’s Manual 3.59


Defining Properties

Hip-roof geometry can be used with ring, segmented ring, rectangular or


staggered rectangular tiles.

x border
Top View
Y
Y
y border Z
y width X y angle

x width
Z Side
View
X

Front View
x angle

FIGURE 3.42 - Hip-roof "bump" geometry showing front, side and bottom
views. The local coordinate axes are shown in each view. The outer
rectangle in the front view is the rectangular tile. In this example the y
angle is 45 degrees and the x angle is 30 degrees.

Height/depth

FIGURE 3.43 - Mansard roof tile showing the effect of truncating the roof. In
this example, the x and y borders are both zero. The y angle is 30
degrees and the x angle is 45 degrees.

3.60 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 3.44 - A surface tiled with the mansard roof tile illustrated in Figure
3.43. The x and y borders are zero, so there is no flat region between
the tiles.

Note: To make this RepTile geometry compatible with some of the


Parameterization RepTile features now available (e.g., to resolve situations where
the “border” may no longer be constant), the parameters defining a Hip (Mansard)
Roof RepTile Property have changed to include an X width and Y width replacing
the X border and Y border. Older property definitions are automatically converted
as follows:
• X width = Width - 2 * X border
• Y width = Height - 2 * Y border

Prism geometry
Prism geometry consists of a pyramidal shape that can have different leading and
trailing “x” angles (x0 and x1) as well as different leading and trailing “y” angles (y0
and y1). The dimensions needed to specify prism geometry are shown in Figure
3.45. Note that unlike the hip roof geometry, the prism geometry has no borders or
“landings”. The angles can be defined such that the prism looks “offset” in the
individual tile. Because of this, the center of the tile might not coincide with the
peak of the prism. To make prisms that “run into” each other and make a
continuous prism roof line, make sure the faces mating with the neighboring tiles
are defined with angles of 90. All four angles can vary within a given column of

TracePro 2022 User’s Manual 3.61


Defining Properties

tiles. Prism geometry can be used only with rectangular or staggered rectangular
tiles.

Top View
Y y1 angle
Y
Z
X
y0 angle

Z Side
View
X

x0 angle x1 angle
Front View

FIGURE 3.45 - Prism geometry showing top, side and front views. The local
origin and coordinate axes are shown in each view. Due to the angles
chosen, the local origin does not line up with the “peak” of the prism
structure.

FIGURE 3.46 - A surface tiled with the Prism geometry illustrated in Figure
3.45. Note that all four facet angles change as a function of row, so all
tiles vary in appearance from the top to the bottom of this figure.

Rounded prism geometry


Rounded prism geometry consists of a cylindrical triangular shape that can have a
different leading and trailing y angle (y0 and y1), but with no angles in the x
direction. The dimensions needed to specify a rounded prism geometry are
shown in Figure 3.47. Note that unlike the Hip-Roof geometry, the rounded prism
geometry has no borders or “landings”. Also, unlike the prism geometry, the “x”
angles are limited to 90. The “y” angles can be defined such that the prism looks
“offset” in the individual tile. Because of this, the center of the tile might not
coincide with the peak of the prism. The angles can vary within a given column of
tiles. Prism geometry can be used only with rectangular or staggered rectangular

3.62 TracePro 2022 User’s Manual


RepTile Surfaces

tiles. The raytrace will go faster if there is only one column of tiles - i.e. if the tile
width (x direction) is greater than or equal to the RepTile boundary width (defined
with Define|Apply Properties|RepTile).
Top View
Y
Y y1 angle
Z
X Peak Radius

y0 angle

Trough Radius
Z
Side
X View

Front View
FIGURE 3.47 - Rounded Prism geometry showing front, side and top views.
The local origin and coordinate axes are shown in each view. Due to the
angles chosen, the local origin does not line up with the “peak” of the
prism structure.

FIGURE 3.48 - A surface tiled with the rounded prism illustrated in Figure
3.47. No “x” angles can be defined when using a rounded prism so the
prism “roof” lines are continuous. Note that the angles change as a
function of row, so all tiles vary in appearance from the top to the
bottom of this figure.

TracePro 2022 User’s Manual 3.63


Defining Properties

Enhanced Prism geometry


The Enhanced Prism Geometry combines the features of the Hip Roof, Prism,
and Rounded Prism geometries. It has a rectancular footprint as specified by x
width and y width, so it may have a flat “landing” on one or more sides like the Hip
Roof geometry. All four faces can have different angles like the Prism geometry,
and it may have a flat roof like the Hip Roof Geometry. It may have rounded peaks
and troughs for the y-angled faces like the Rounded Prism geometry. Because the
Enhanced Prism may have landings and a flat roof, there are four different radii to
specify, two for the “troughs” and two for the “peaks.” Finally, if the height specified
for the Enhanced Prism is greater than the intersection height of the y planar
sides, the second peak radius is ignored, and the peak appears as for the
Rounded Prism geometry.

peak radius 0 peak radius 1
Depth/Height
Y0 angle
Y1 angle

trough radius 0
trough radius 1
Y width

FIGURE 3.49 - Enhanced Prism geometry showing Y-Z profile for “bump”
geometry. Due to the angles chosen, the local origin does not line up
with the center of the roof of the prism structure.

FIGURE 3.50 - Enhanced Prism X-Z profle view, showing X0 and X1 angles
for bump geometry.

3.64 TracePro 2022 User’s Manual


RepTile Surfaces

Log geometry
The Log geometry is so called because it is like a log floating in water. The Log is
is a frustum of a cylinder or cone nominally lying on its side, and its depth and
orientation can be specified. The orientation is controlled by rotation angles about
the x, y, and z axes. With all rotation angles equal to zero, the axis of the log is
along the local x axis. The cylinder or cone may also be elliptical in cross-section.
With all rotation angles equal to zero, a Radius Ratio greater than one puts the
long axis of the ellipse along the Z axis.

End 1 End 2

End 1 radius
Length End 2 radius

FIGURE 3.51 - Log “bump” geometry showing X-Z and Y-Z views. The log
shown has a Radius Ratio of 2, putting the long axis of the elliptical
cross-section along the Z axis.

FIGURE 3.52 - Log “bump” geometry oblique view.

Flattened Cone geometry


The Flattened Cone geometry is like Cone geometry, but with no chamfer and
rounded top and bottom edges. The inputs for a Flattened Cone are end radius,

TracePro 2022 User’s Manual 3.65


Defining Properties

depth/height, cone angle, peak radius, and trough radius. For parameterized
geometry, you can also enter decenter in x and y.

FIGURE 3.53 - Flattened Cone “bump” geometry.

Pointed Cone geometry


The Pointed Cone geometry is an inverted cone, with point facing up for bump
geometry or down for hole geometry, and rounded point and trough. The inputs for
a Pointed Cone are depth/height, cone angle, peak radius, and trough radius. For
parameterized geometry, you can also enter decenter in x and y.

FIGURE 3.54 - Pointed Cone “bump” geometry.

3.66 TracePro 2022 User’s Manual


RepTile Surfaces

Block geometry
Block geometry is used to create a block that floats above the base plane (bump
geometry) or is embedded below the base plane (hole geometry). The block can
be rotated to any orientation.

FIGURE 3.55 - Block dimensions.

To create block RepTile geometry, you specify center depth/height, X width, Y


width, Z width, X rotation angle, Y rotation angle, Z rotation angle, and for
parameterized geometry, decenter in X and Y (or R and phi for ring tiles).

The block is rotated about its center point, about the X, Y and Z axes in turn.

FIGURE 3.56 - Block depth/height and rotation center.

TracePro 2022 User’s Manual 3.67


Defining Properties

Chiseled Log geometry


Chiseled Log geometry is a frustum of an elliptical cone with ends that are
optionally cut or chiseled at an angle. The Chiseled Log can be made as either a
bump or a hole. It can be rotated in the x-y plane as well.

FIGURE 3.57 - Chiseled Log dimensions.

To create Chiseled Log geometry, you specify center depth/height, length, end 1
and end 2 radii, end 1 and end 2 tilt angle, radius ratio (for an elliptical cone)
orientation angle (rotation about the Z axis), and for parameterized geometry,
decenter in X and Y (or R and phi for ring tiles).

The radius ratio is the radius along the z direction divided by the radius in the x-y
plane.

DMD Mirror geometry


DMD Mirror geometry is used to model the individual reflectors in a Digital
Micromirror Device (DMD).

3.68 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 3.58 - DMD Mirror geometry.

DMD Mirror geometry consists of a square mirror mounted on a square post, with
an optional square hole in the center of the mirror, oriented at 45° to the mirror.
To create each DMD mirror, you specify the depth/height, thickness, width, hole
width, post width, tilt angle, and for parameterized geometry, orientation angle and
decenter in X and Y (or R and phi for ring tiles).
The mirror is tilted about the diagonal along the (1 1 0) direction in local
coordinates (orientation angle = 0), with the center of rotation at the base of the
mirror, as shown in Figure 3.60.

FIGURE 3.59 - DMD Mirror dimensions.

TracePro 2022 User’s Manual 3.69


Defining Properties

FIGURE 3.60 - DMD Rotation axis and rotation center.

Torus geometry
Torus RepTile geometry is specified by a major radius, minor radius, x center, y
center, and depth/height. Parameterized tori can also be decentered in x and y.

FIGURE 3.61 - Torus major and minor radii.

A torus can be specified as a normal ring-shaped torus as shown in Figure 3.61,


or as a self-intersecting “apple” or “lemon” torus as shown in Figure 3.62. For a
normal torus, the major radius is greater than the minor radius. For a self-
intersecting torus, the major radius is less than the minor radius. For an apple
torus, the major radius is positive, while for a lemon torus the major radius is
negative. Attempting to make a torus with negative major radius with magnitude
greater than the minor radius results in no surface at all.

3.70 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 3.62 - Example of an apple torus (left, with major radius =1, minor
radius = 2) and a lemon torus (right, with major radius = -1, minor radius
= 2).

Asphere geometry
Asphere RepTile geometry is a single surface defined according to the rotationally
symmetric lens surface sag equation,

8
c  2

z = ------------------------------------------------------
-+ A   , (3.9)
2 2
1 + 1 –  1 + K c v   = 1

where 2=X2+Y2, c is the vertex curvature of the surface, K is the conic constant
and Ai is an aspheric coefficient. The X, Y, Z coordinates above are local
coordinates relative to the vertex of the surface.
To specify an aspheric surface, enter the radius (i.e. semi-diameter) of the
surface, the vertex curvature, the conic constant, and the eight aspheric
coefficients. You do not need to specify the height of the surface, as the height will
be adjusted so that the circle defining the outer edge lies on the base plane of the
RepTile cell. Therefore the vertex height of the surface is determined by the sag
equation,

8
c  R2

height = ------------------------------------------------------- + A R  , (3.10)
2 2
1 + 1 –  1 + K c v R  = 1
where R is the radius (semi-diameter) of the surface.

TracePro 2022 User’s Manual 3.71


Defining Properties

Polygon geometry
Polygon RepTile geometry is a solid regular polygon specified by the radius of a
circle circumscribing the polygon, thickness, number of sides, x center, y center,
depth/height, and (x,y,z) rotation angles. Parameterized polygons can also be
decentered in x and y.

FIGURE 3.63 - Example of a six-sided regular polygon (hexagon) RepTile


feature.

The depth/height specifies the distance from the base plane to the center of the
polygon. For bump geometry, depth/height is the height above the base plane,
and for hole geometry, depth/height is the depth below the base plane.

FIGURE 3.64 - Depth/Height, Thickness, and Rotation point of a polygon


RepTile feature.

3.72 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 3.65 - Radius of a polygon RepTile feature.

FIGURE 3.66 - Circular hip roof RepTile feature.

TracePro 2022 User’s Manual 3.73


Defining Properties

Cube-corner geometry
Cube corner geometry consists of cube-corner retro-reflectors arranged in a
hexagonal pattern. There are no parameters needed to specify a cube-corner,
other than the tile width. Cube-corners are oriented within a tile as shown in
Figure 3.67. Cube-corner geometry can only be used with hexagonal tiles. Due to
its shape, the perimeter edges of a cube-corner tile are not at a constant height,
but the perimeter edges will mate well with neighboring cube-corner tiles.

Bottoms of
holes

FIGURE 3.67 - A cube corner is oriented in a hexagonal tile as shown (along


with two neighboring tiles). The cube corner tile is always concave, that
is, the vertex (at the origin in this illustration) is at the bottom of a hole.

Pyramid geometry
Pyramid geometry consists of a regular pyramid, with point facing up for bump
geometry or down for hole geometry. The inputs for a Pyramid are the radius of a
circle circumscribing the pyramid, pyramid angle and number of sides. The
pyramid angle is the angle between a side plane of the pyramid and the base
plane. For parameterized geometry, you can also enter decenter in x and y.

Circular hip roof geometry


Circular hip roof RepTile geometry is a solid circular hip roof specified by inner
radius, height/depth, width, and angles. Parameterized circular hip roof can also
be decentered in x and y.

Texture File
Texture Files are a method to apply RepTile-type Geometry to surfaces. These
Texture Files contain numerical data about the Features that comprise the RepTile
Geometry; however, there are a number of differences between RepTile Texture
File and standard RepTile Geometry:
• The data describing the Features comes from an external file that is generated
by other means (e.g., CAD or spreadsheet programs).
• The Texture File must follow a prescribed data format (See “Texture File For-
mat” on page 7.111.).
• Each Feature within the Texture File is distinct, meaning that the Features are
not tiled across the selected RepTile region, but each must be specifically
listed in the TextureFile (thus this file can get quite large).
• The Feature data does not have to be in any particular order, such that Feature
spatial positions, size, and so forth can be variable (i.e., random) within the file.

3.74 TracePro 2022 User’s Manual


RepTile Surfaces

• Multiple Features can inhabit the same RepTile Tile/Pixel.


• If features overlap, unpredictable results may occur, resulting in raytrace
errors. This is not recommended.
• A Texture File can contain both Bumps and Holes, but the user must practice
caution with this option since overlap of Features can lead to non-physical
RepTile Geometry (i.e., undercut). A protocol is followed within TracePro to
disallow such (“Base Plane Designation for Textured RepTile” on page 4.52).
• The ability to invert the Bump/Hole designation of each Feature with the use of
the Bump/Hole Button in the RepTile Property Editor.
• The RepTile Buffers are 1 x 10-10 mm.
• Texture File Features overlapping the RepTile boundary are ignored.
Otherwise, the defining, applying, and ray tracing of RepTile Texture Files is
accomplished the same way as other RepTile Properties. The current capabilities
for the Feature Geometry Types that can be contained within a RepTile Texture
File are shown in Table 3.13 on page 3.55.
In the RepTile Property Editor window, follow these steps to define a new RepTile
Texture File:
• While in the Catalog of interest, select Add Property…, which will display the
Enter New RepTile Property dialog (see Figure 3.68).

FIGURE 3.68 - Enter new RepTile property for a Variation Type of Texture
File.

• Provide a RepTile Name and for Variation Type select Texture File. Note that
Tile Type and Geometry Type are not applicable (N/A).
• Select OK, which will show return focus to the RepTile Property Editor.
• You can now enter a text Description.

TracePro 2022 User’s Manual 3.75


Defining Properties

• Additionally, while each Feature within the Texture File has a Bump or Hole
designation, you can invert this designation by using the Bump/Hole button.
By showing Hole with this button, the direction of the Feature (i.e., Bump or
Hole) will be inverted for the ray trace. You can set the default bump/hole set-
ting to Bump, Hole, Mixed, or Inverted using the combo box (see “Bump Desig-
nation for Textured RepTile” on page 4.48 for more details on each type).
• The RepTile Type area of the RepTile Property Editor shows Variation Type:
Texture File, Tile Type: N/A, and Variation Type: N/A.
• Within the Tile Parameters area of the RepTile Property Editor allows only one
entry at this time, File along with a Browse (i.e., "…") button to locate the file.
Enter the Filename including path or use the Browse button to locate it. The
updated RepTile Property Editor appears as shown in Figure 3.69 on
page 3.77.
• Once you have selected the File, the Def. Width and Def. Height data entry
cells are opened for editing. These are the default tile widths and heights
respectively. The initial values are 0, but it is good practice to enter positive
spatial dimensions for each. Note that you have the ability to enter model spe-
cific values for the Tile width and height (see “Specifying a RepTile Texture File
Surface” on page 4.46).
Upon completing the steps listed above, your RepTile Texture File property is
complete. There is no additional data that needs to be entered to specify your
RepTile Texture File property. Select the Save the Property icon to save the newly
created property in the database.
For creation of a Texture File, please See “Texture File Format” on page 7.111 for
further discussion on this topic.

3.76 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 3.69 - RepTile Property Editor for the input of a Texture File after
the File has been entered or selected and the default width and height
have been set.

RepTile Parameterization
RepTile Geometry and Tile patterns can be parameterized (defined by a
mathematical expression). To access this capability, select the Variation Type to
be “Parameterized” when creating a new RepTile Property

TracePro 2022 User’s Manual 3.77


Defining Properties

FIGURE 3.70 - New RepTile Property dialog.

Variables
To add parametrization, variables have been defined based on the types of tile
selected for the property. The variables are used to identify a tile’s position within
the RepTile geometry. By defining a RepTile parameterization, the tile and
geometry can vary over the surface upon which the property is applied. The
variables provide in the mathematical expressions vary depending on the Tile
Type as follows:

Rectangle and Staggered Rectangle


iRow = row number (counting in the +Y direction)
jCol = column number (counting in the +X direction)

Ring
iRing = ring number (counting from the center outward)
jAzi = azimuth angle (in degrees, clockwise from the +x axis)

Parameterized Input Fields


In the RepTile Property Editor, the input fields that appear in Evaluator Control
color, see “Background colors” on page 2.58, are fields that will accept a
mathematical expression. The expression are the same as the one used in dialog
box controls described in the section titled “Expression Evaluator” on page 1.15.
The functions can use the variables defined above. The Variables allowed in
these expressions are dependent on the Tile Type and Geometry Type as show in
Table 3.14 and in Table 3.15.

3.78 TracePro 2022 User’s Manual


RepTile Surfaces

TABLE 3.14. Tile Parameters

Tile Type Input Field Associated


Variable Names
Ring Ring Width iRing
Seg. Width IRing, jAzi
Start Angle IRing
# of Segments iRing
Rectangles Width jCol
Height iRow
Staggered Rectangles Width jCol
Height iRow
Row Offset iRow

Note that the Row Offset for the Staggered Rectangles tile type is the offset
between one row to another. Entering a constant value does not cause any
staggering, and, thus, it appears as a Rectangle tile type. To get staggering that
varies by row you must enter some functional form with the iRow variable. For
example, to obtain a half-tile width stagger, you could use a formula such as:
Row Offset = (TILE WIDTH)*(iRow%2)/2,
where “iRow” indicates the row number, “%2” indicates modulus 2 (i.e., the
remainder if you divide iRow by 2), “/2” gives either a value of 0 or 0.5, and “TILE
WIDTH” is the value that you entered for the TILE WIDTH (i.e., you must enter the
explicit value). The Row Offset value is then the offset in millimeters from one row
to another as per the entered equation.

TracePro 2022 User’s Manual 3.79


Defining Properties

TABLE 3.15. Geometry Parameters

Geometry Type Input Field Variables allowed


Fresnel Facet Angle iRing
Draft Angle iRing
Cone End Radius iRow / iRing, jCol / jAzi
Depth/Height iRow / iRing, jCol / jAzi
Cone Angle iRow / iRing, jCol / jAzi
Chamfer Height iRow / iRing, jCol / jAzi
Chamfer Angle iRow / iRing, jCol / jAzi
Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Sphere Radius iRow / iRing, jCol / jAzi
Depth/Height iRow / iRing, jCol / jAzi
Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Ellipsoid X Radius, Y Radius,  iRow / iRing, jCol / jAzi
Z Radius
Center Height iRow / iRing, jCol / jAzi
Rotate X, Rotate Y,  iRow / iRing, jCol / jAzi
Rotate Z
Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Hip (Mansard) Roof Depth/Width iRow / iRing, jCol / jAzi
X Width, Y Width iRow / iRing, jCol / jAzi
X Angle, Y Angle iRow / iRing, jCol / jAzi
Orient iRow / iRing, jCol / jAzi
Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Cube Corner (none) (none)
Prism Y(0) Angle, Y(1) Angle iRow / iRing, jCol / jAzi
X(0) Angle, X(1) Angle iRow / iRing, jCol / jAzi
Rounded Prism Y(0) Angle, Y(1) Angle iRow / iRing, jCol / jAzi
Peak Radius iRow / iRing, jCol / jAzi
Trough Radius iRow / iRing, jCol / jAzi
Enhanced Prism Xwidth, Ywidth, Depth/Hgt iRow / iRing, jCol / jAzi
X0, X1, Y0, Y1 angles iRow / iRing, jCol / jAzi
Peak 0,1, Trough 0,1 radii iRow / iRing, jCol / jAzi

3.80 TracePro 2022 User’s Manual


RepTile Surfaces

Enhanced Prism Orientation iRow / iRing, jCol / jAzi


Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Log Center Depth/Height iRow / iRing, jCol / jAzi
Length iRow / iRing, jCol / jAzi
End radii iRow / iRing, jCol / jAzi
X, Y, Z rotation iRow / iRing, jCol / jAzi
Radius Ratio iRow / iRing, jCol / jAzi
Decenter (x,y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Flattened Cone End Radius iRow / iRing, jCol / jAzi
Depth/Height iRow / iRing, jCol / jAzi
Cone Angle iRow / iRing, jCol / jAzi
Peak Radius iRow / iRing, jCol / jAzi
Trough Radius iRow / iRing, jCol / jAzi
Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Pointed cone Depth/Height iRow / iRing, jCol / jAzi
Cone Angle iRow / iRing, jCol / jAzi
Peak Radius iRow / iRing, jCol / jAzi
Trough Radius iRow / iRing, jCol / jAzi
Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Block Center Depth/Height iRow / iRing, jCol / jAzi
X Width iRow / iRing, jCol / jAzi
Y Width iRow / iRing, jCol / jAzi
Z Width iRow / iRing, jCol / jAzi
Rotate X iRow / iRing, jCol / jAzi
Rotate Y iRow / iRing, jCol / jAzi
Rotate Z iRow / iRing, jCol / jAzi
Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Polygon Radius iRow / iRing, jCol / jAzi
Depth/Height iRow / iRing, jCol / jAzi
Thickness iRow / iRing, jCol / jAzi
No. of Sides iRow / iRing, jCol / jAzi
Rotate X iRow / iRing, jCol / jAzi

TracePro 2022 User’s Manual 3.81


Defining Properties

Rotate Y iRow / iRing, jCol / jAzi


Rotate Z iRow / iRing, jCol / jAzi
Decenter (x, y) iRow, jCol
Decenter (r, phi) iRing, jAzi
Pyramid Radius iRow / iRing, jCol / jAzi
Angle iRow / iRing, jCol / jAzi
No. of Sides iRow / iRing, jCol / jAzi
Decenter (x,y) iRow, jCol
Decenter (r,phi) iRing, jAzi

Parameter Expressions

FIGURE 3.71 - Sphere Geometry Expressions using the iRing Variable.

Decentering RepTile Geometry


The cone, sphere, ellipsoid, hip (Mansard) roof, enhanced prism, and log
geometry provide a decenter parameter if the Variation Type Parameterized is
specified for the property. In this case the geometry can be decentered within the
tile. For the rectangle and staggered rectangle tile types, the input parameters are

3.82 TracePro 2022 User’s Manual


Property Database Tools

Decenter x and Decenter y. For ring tiles, the input parameters are Decenter r
(positive r is outward) and Decenter phi, where phi is in degrees and 0 phi is in the
+X direction. See Figure 3.71 for an example of a ring tile property with sphere
geometry.

Property Database Tools


The Tools|Database menu provides tools to update and maintain the TracePro
properties database. The Property data is stored in a database file named
TracePro.db by default. You can set the actual name and location of the property
database in the View|Options|General dialog box.
You can also update the database from the Lambda Research website from a
selection on the Help menu, as described below.

Update Property Database


TracePro is published with many “built-in” properties to aid you in building
accurate models. From time to time Lambda Research updates this built-in
database with new or improved properties. To download and install the most
recent property database from the Customer Support Center at
www.lambdares.com, select Help|Update Property Database. Updating your
database will not overwrite or delete any properties you have created and added
to your database.

Import
The Tools|Database Import selection translates property data into TracePro
from a text file. Unlike the Import Property commands associated with the various
editors, the text file can contain several properties, of the same or different types,
separated by a “SAVE-DATA” line. Thus, surface properties, material properties,
bulk scatter properties, etc. can all be concatenated into a single file, each
property separated by a “SAVE-DATA” line. All data from the default property
database is included on the TracePro distribution media.
Note: SAVE-DATA is used to define the last line of a property for a concatenated
property file. If you are reading the file or creating a property file for TracePro
import see the section titled “Property Import/Export Formats” on page 7.93.
During importation, the property names are checked against the current
properties in the database. If a name matches an existing property, you are
notified. The individual property can be overwritten or skipped. If you are importing
many properties you have the option to overwrite the current entry, all subsequent
entries, to skip the current entry or to skip all subsequent entries as shown in
Figure 3.72.

TracePro 2022 User’s Manual 3.83


Defining Properties

FIGURE 3.72 - Confirm Overwrite dialog.

Export
The Property Export command will generate a single file containing all property
data for a Model. Selecting Tools|Database|Export or pressing the F12 key
will generate a text file of property data. The File Save As dialog will be displayed
to allow you to enter a property file name. Each property is separated by a SAVE-
DATA line as described in the online help. The data may be reentered using
Tools|Database|Import or the F11 key.
If you are working with TracePro support personnel or are collaborating with other
TracePro users and are sending oml files, you should export the model properties
and send the property file along with the oml file. These two files contain all the
data required to open and analyze a TracePro model.

3.84 TracePro 2022 User’s Manual


Using Properties

CHAPTER 4 Applying Properties

Using Properties
After the geometry has been created in TracePro, properties are assigned to the
geometry to determine how rays interact with the model and how it is displayed in
the Model Window. TracePro allows you to define your own properties (see
Chapter 3, “Defining Properties”).

Limitations in Pre-Defined Property Data


Much of the property data supplied with TracePro is derived from data sheets and
published data. In some cases the data is very complete as is the case with
optical glass data from manufacturers like Schott, Ohara and Hoya. In other cases
the data is only given for a small range of values, which is the case for the metal
properties from manufacturers like Alanod and Sacall. For example aluminium
suppliers declare specular reflection and diffuse reflection in accordance with DIN
5036, a method of measurement which use an integrating sphere. This is
insufficient to describe the BSDF distribution function necessary to simulate
scatter in TracePro. It is recommended that each user verify that the data is
appropriate for their needs and that measured data be obtained directly from the
material vendor or a third party measurement service. This is particularly
important for scatter data and optical coatings.

Applying Property Data


What properties are needed to model a specific problem? To answer this
question, it is useful to think of the properties in terms of Physical Properties vs.
Raytrace Properties.
Physical Properties translate into the hardware that is built when the model or
design is completed. These properties have a direct impact on the ray trace and
include Material and Surface properties. The list of Physical Properties in
Table 4.1 can be reviewed to determine which properties are applicable to a given
model.
Raytrace Properties are applied to utilize features available in TracePro to assist
you in making the ray trace more efficient. These properties are not physical
attributes of the final hardware. Importance Sampling and Exit Surface are
examples of ray trace properties. It is not necessary to apply any of these
properties to a given model. Once the Physical Properties have been applied, you
can move ahead to Chapter 5, “Ray Tracing and Optimization” to determine
which TracePro Raytrace features will be useful for the model, and then come
back to this chapter to apply the necessary ray trace properties.
The method for applying properties is the same for all properties. The only
distinction is between properties that are applied to Objects vs. those applied to
Surfaces. See Table 4.1 for a summary. The steps for adding properties are:
• Select Define|Apply Properties from the menu to open the Apply Proper-
ties dialog box. A right click in either the System Tree or the Model Window

TracePro 2022 User’s Manual 4.1


Applying Properties

provides a shortcut to the Properties dialog box. See “Context Sensitive


Menus” on page 1.9.
• Select the appropriate tab within the Apply Properties box for the property to
be updated.
• Select the object or surface, either by selecting it in the System Tree or in the
Model Window. See “Selecting Objects and Surfaces” on page 1.11.
• Input the necessary data into the Apply Properties dialog (see the remainder of
this chapter for specific information about each property)
• Click the Apply button.
• To confirm that a property has been applied, expand the object or surface in
the System Tree and review the property information.
• The Apply Properties dialog is a modeless dialog, so it can be left open while
doing other tasks in TracePro. At any time, you can come back to the open
Apply Properties dialog, select an Object or Surface in the System Tree, input
the necessary data and click Apply.
• Surface Properties may be applied to individual surfaces or to objects. If the
property is being applied to a selected object, each of the object’s surfaces will
receive the property data. This useful shortcut is provided for your conve-
nience. Be careful to select the desired set of objects and surfaces when
applying property data.

TABLE 4.1. Apply Properties Categories

Object Surface
Material* Surface*
Temperature Surface Source*
Physical Properties Mueller Matrix* Diffraction
(polarization) Temperature
Gradient Index* Temperature Distribution
Bulk Scattering* RepTile**
Raytrace Flag Surface Source
Raytrace Properties
Importance Sampling Prescription 
Importance Sampling
Exit Surface

Color Color
Other Properties
Class and User Data

* Properties must exist in the Property Database to be used. A number of


properties are predefined for your use, but you may define new ones
(See Chapter 3).
Expert ** RepTile Properties must be defined prior to use and are stored in the Property
Database (See “RepTile Surfaces” on page 3.49.).
To provide additional perspective on the Apply Properties tools discussed in this
chapter, Table 4.2 lists the properties and the purposes for which they are used.

4.2 TracePro 2022 User’s Manual


Using Properties

TABLE 4.2. Properties and Applications

Properties When Needed?


Material Refraction, Fresnel Reflections, Bulk Absorption, Bulk Scattering,
Gradient Index
Surface Reflection (other than Fresnel reflection), Coatings, Thin Film
Stacks, Scatter, Surface Absorption, Gratings
Surface Source Used to define source for Surface Ray Tracing. See Chapter 5,
“Ray Tracing and Optimization”.
Temperature Needed only if other properties are temperature-dependent, such as
cases where the Index of Refraction varies with temperature
Mueller Matrix Needed only when modeling Polarization effects
Gradient Index Needed only for materials with varying Indexes of Refraction,
requires Material property
Bulk Scattering Needed only for modeling scatter from within the volume of an
object, requires Material property (For Surface Scatter, see “Surface
Properties” on page 4.10)
Fluorescence Used to simulate models with fluorescent material.
Diffraction Needed only when the diffraction effects of rays incident near the
edges of an aperture are significant, usually for stray light analysis
Color To change the display color of an object or surface to another color
from the default color (green)
Class & User Data Provides resources that the macro language can use
Raytrace Flag Lets you remove individual objects from a raytrace
Prescription Needed for Auto Importance Sampling and optical scatter intercept
limits
Importance Sampling Needed only for Importance Sampling
Exit Surface Needed for Simulation Mode raytraces and Reverse Ray Tracing
RepTile Needed for modeling surfaces with repeated structures
Temperature Distribution Used to apply spatially varying temperature distributions to surfaces,
requires Surface property

TracePro 2022 User’s Manual 4.3


Applying Properties

Material Properties
Use the Material Property to specify the index of refraction and the bulk
absorption of an object.

FIGURE 4.1 - Apply Properties Dialog Box - Material

The Material tab displays a series of buttons and dropdown boxes that allow you
to:
• Select an existing material property from the Property Database.
• View the data for the selected property
• Apply the selected property to an object in the model.

Material Catalogs
The Material Properties are grouped into Catalogs. You can add more catalogs to
make it easier to find properties that you want to apply.
The catalogs include manufacturer’s data, other data supplied with TracePro, and
user-defined materials.

Applying Material Properties


A database exists containing predefined materials. You can choose among them
or you can modify or add user-defined materials by using the Material Property
editor. See “Material Properties” on page 3.5.
To apply material properties to an object in your model:

4.4 TracePro 2022 User’s Manual


Material Properties

1. Select an object in your model. You can select an object by clicking it in the
System Tree or in the model window.
2. Choose Define|Apply Properties and select the Material tab.
3. Select a catalog using the drop-down catalog list and select the name of the
desired material using the drop-down name list.
4. Click Apply to apply the changes.
5. Check to be sure that the new property is visible in the system tree.

Applying Birefringent Material Properties Expert

To apply birefringent material properties to an object in your model:


1. Select an object in your model. You can select an object by clicking it in the
System Tree or in the model window.
2. Choose Define|Apply Properties and select the Material tab.
3. Select a catalog using the Catalog list and select the name of the desired
material using the Name list.
4. For birefringent properties, you must also enter the Crystal Axis. In the
Birefringent Crystal Axis box, enter a vector parallel to the crystal axis. The
orientation of the crystal axis will be maintained relative to the object as the
object is moved and rotated. See Figure 4.2.
5. Click Apply to apply the changes.
6. Check to be sure that the new property is visible in the system tree.

FIGURE 4.2 - Material data for a Birefringent material

TracePro 2022 User’s Manual 4.5


Applying Properties

Bulk Scattering Standard Expert

Bulk scatter is scatter caused by particles and inclusions within a material. A bulk
scattering property works together with an object's material property. (See the
Technical Reference page 7.61 for more details).

FIGURE 4.3 - Apply Properties Dialog Box - Bulk Scattering

Bulk Scatter properties are applied by selecting Define|Apply


Properties|Bulk Scattering as shown in Figure 4.3 and edited by selecting
Define|Edit Property Data|Bulk Scatter Properties. A simple example,
shown in Figure 4.4 on the left, uses a block of Schott BK7, 1 mm on each side. A
single ray, shown in red, is incident at 45 degrees on the front of the block. It is
then reflected via total internal reflection from one side, and finally refracts through
the back surface. The blue rays denote rays resulting from Fresnel reflections.

4.6 TracePro 2022 User’s Manual


Fluorescence Properties

The plot shown on the right shows the same model except a Bulk Scattering
property has been added.

FIGURE 4.4 - Block of glass shown before (left) and after (right) Bulk
Scattering property is applied.

You can also apply importance sampling to a solid object to enhance the sampling
of bulk scatter. To obtain Figure 4.5, an importance target at the base of the object
increases the number of rays propagating toward the target. Each importance ray
is scattered within the object.

FIGURE 4.5 - Bulk Scattering with Importance Sampling Target

Note: The flux threshold for these examples was set to 0.0005. See “Thresholds”
on page 5.46.
To use bulk scattering:
1. Apply a material property appropriate for the volume within which the
scattering is to be modeled.
2. Apply a Bulk Scattering property.

Fluorescence Properties Expert

Fluorescence is modeled in TracePro through a combination of fluorescence


properties applied to objects and enhanced ray tracing features. Fluorescence
Properties include relative absorption and relative excitation normalized to the
peak molar extinction coefficient, and relative emission. Concentration of the
fluorescing material can be set in the model by entering the molar concentration

TracePro 2022 User’s Manual 4.7


Applying Properties

when applying the property to a solid object. When the model is raytraced, the
raytrace is broken into two stages. In the first stage of the raytrace, rays are traced
in the excitation part of the material spectrum. A by-product of the first stage of the
raytrace is that TracePro ray files are generated which contain rays emanating
from sites in the fluorescent material. The second stage of the ray trace uses the
ray files to trace fluorescent rays.

FIGURE 4.6 - Fluorescence Property data.

Applying Fluorescence Properties


Database catalogs exist that contain predefined fluorescent properties. You can
choose among them or you can modify or add user-defined materials by using the
Fluorescence Property editor. See “Fluorescence Properties” on page 3.12.
To apply Fluorescence properties to an object in your model:
1. Select an object in your model. You can select an object by clicking it in the
System Tree or in the model window.
2. Choose Define|Apply Properties and select the Fluorescence tab.
3. Select a catalog using the drop-down catalog list and select the name of the
desired material using the drop-down name list.
4. Edit the Conversion Efficiency and Peak Molar Extinction values, if required
5. Enter the Molar Concentration.
6. Add Fluorescence emission waveband edges and enter the number of
wavelengths (# Inc) within each band. Emission rays will be generated at each

4.8 TracePro 2022 User’s Manual


Gradient Index Properties

wavelength. You can easily exclude the zero-to-first-wavelength band and last-
wavelength-to-infinity band by entering 0 for the # Inc value.
7. Click Apply to apply the changes.
8. Check to be sure that the new property is clearly visible in the system tree.
Fluorescent properties are used in combination with the object’s bulk material
properties. The Refractive Index and Absorption will be determined by the
Material Property applied to the object. See “Applying Material Properties” on
page 4.4.

Gradient Index Properties Standard Expert

Gradient Index Properties apply to materials with an inhomogeneous index of


refraction. Examples are glass in which the index changes from center to edge, or
optical fiber that also refracts light differently from center to edge.
The gradient index is coupled to the object's material property to vary the index of
refraction along a parametric profile.
Note: GRADIUM, one of the types in the Type dropdown box, must be treated
differently. Unlike others, the GRADIUM Gradient Index includes material property
data and does not require association with a material property. In cases like this
one, Do NOT apply a material property to an object that has GRADIUM applied.
For all other Gradient Index properties, you must apply a material property to
supply the base index of refraction. For example, an Axial-Radial profile as shown
in Figure 4.7 can be defined by doing the following:
Select Define|Apply Properties|Material tab and apply a glass material to
the rod (e.g. Schott BK7).
Select Define|Apply Properties|Gradient Index property tab to apply the
property. The profile is applied to the glass rod object along with an origin and
propagation direction. An Up Vector is included to define lateral symmetries. Once
this data is applied, the origin and direction vectors are updated if you move or
rotate the object.

TracePro 2022 User’s Manual 4.9


Applying Properties

FIGURE 4.7 - Applying a GRIN Property to a Rod

Surface Properties
Surface properties provide physical data for absorptance, scatter (BRDF and
BTDF), specular reflectance and specular transmittance. In TracePro, surface
properties are identified by name and catalog, and stored in a database.
For detailed descriptions of the components of surface properties such as BRDF
and BTDF, see Chapter 7, “Technical Reference”.
To select a property and apply it to a surface, use the following steps:
1. Select a surface in your model. Select from the model window or from the
System Tree. You may also select an object to apply the property to all the
surfaces of the object.
2. Select Define|Apply Properties and then select the Surface tab.
3. Select a surface property catalog and name from the drop-down lists.
4. For a Table Type Surface Property, a “Reference Data” tab is displayed. You
also need to select “Angles Measured in Air” or “Angles Measured in
Substrate”. The “Angles Measured in Substrate” option is required only if the
raw data used to create the surface property was measured in a medium other
than air. For all other cases, the default selection of “Angles Measured in Air”
must be used.
5. For a Grating Type Surface Property, you also need to input the values for the
Up Direction. The Up Direction is the direction of positive grating orders, and

4.10 TracePro 2022 User’s Manual


Surface Properties

also specifies the zero azimuth direction for anisotropy and asymmetric
scatter.
6. For Anisotropic properties or Elliptical BSDF, you need to define the
Anisotropic/Asymmetric Axis which orients the 0.0 angle for the Azimuth
direction.
7. For Asymmetric Table BSDF, you can choose “Use fixed axis for zero-azimuth
asymmetric scatter” allowing you to define the Anisotropic/Asymmetric Axis
which orients the 0.0 angle for the Azimuth direction.
8. Click the Apply button.
9. Check the System Tree for the changes you entered.
Note that for neighboring objects, you have the issue of coincident surfaces and
the problem of how TracePro handles the situation if different surface properties
are applied to these two distinct surfaces. See See “Coincident Surfaces” on
page 7.15.

FIGURE 4.8 - Surface property with Reference Data and Anisotropic/


Asymmetric Axis tabs

Using the Surface Property Database


A database filled with predefined surface properties exists as a resource in
TracePro. You can view current surface property definitions, add your own
catalogs and add your own surface properties using the Surface Property editor
(See “Surface Properties” on page 3.23.).

TracePro 2022 User’s Manual 4.11


Applying Properties

Surface Source Properties


A surface source is a surface that is designated to emit rays in a raytrace. There
are five types of surface source properties in TracePro. Two types can emit
discrete wavelengths (flux, irradiance) and two types can emit calculated
wavelengths (blackbody, graybody). The fifth type, Surface Source Property, can
emit either discrete wavelengths or calculated wavelengths.
You can make any surface in a TracePro model a source of rays for use in a
raytrace:
1. Select a surface to which to apply a surface source property. You can make a
surface selection in the System Tree or in the model window.
Note: If you apply a surface source to an object, TracePro will apply the property
to each of the object’s surfaces.
2. Choose Define|Apply Properties to open the Apply Properties dialog box.
You can also access the dialog from the Source tab in the System Tree or from
the Define|Surface Source menu.
3. Select Surface Source.
4. Specify the Surface Source property type. The option that you select changes
the fields on the Surface Source tab. Select from the following:
• Surface Source Property (Figure 4.9),
• Flux (Figure 4.11),
• Irradiance (Figure 4.11),
• Blackbody (Figure 4.10), or
• Graybody (Figure 4.10).
5. Select the Units (Flux or Irradiance source only).
6. Select an angular distribution (except for Surface Source Property type).
7. Select the Rays to be emitted. In most cases this is set to All.
8. Enter a value for the flux (Flux source) or irradiance (Irradiance source) or
temperature (Blackbody or Graybody source).
9. Enter the minimum number of rays for any wavelength.
10.Enter the total number of rays to trace.
11. Enter the Scale factor (only for Surface Source Properties). Use this if you
need to scale the flux emitted from a Surface Source Property.
12.Enter the Up Vector (only for asymmetric Surface Source Properties, i.e.
Gaussian or Table angular type). The Up Vector defines the direction of the
azimuth = 0 axis of the property.
13.For a Surface Source Property Surface, select Discrete wavelengths or
Calculated wavelengths.
14.Enter as many wavelengths as you need: type in each wavelength in m, then
click the Add button in the Wavelengths box or press the Enter key.
15.For discrete wavelengths, edit weights as needed.
16.For calculated wavelengths, edit #Inc as needed for each waveband.
17.Define as many surfaces to be source surfaces as you need.
a. Make a surface a source by first selecting Define|Apply Properties, or
by clicking the right mouse button in the Model window and selecting
Properties... from the pop-up menu. That menu opens the Apply Prop-

4.12 TracePro 2022 User’s Manual


Surface Source Properties

erties dialog box. See Figure 4.10 for a view of the Apply Properties dialog
box.
b. Select the Surface Source tab and select a surface.
c. Fill in necessary fields to specify the source, and press the Apply button.
Flux and Irradiance Type Surface Sources emit discrete wavelengths, and
Blackbody and Graybody Type Surface Sources emit calculated wavelengths.
With a Surface Source Property surface source you can choose whether you want
calculated or discrete wavelengths.
Also, you can remove the source property from a surface by opening the dialog
box, selecting the surface with the mouse, then select Source Type <None> and
click the Apply button.

FIGURE 4.9 - Surface Source Property Surface Source (shown with Discrete
Wavelengths)

TracePro 2022 User’s Manual 4.13


Applying Properties

FIGURE 4.10 - Blackbody Source (requires Calculated Wavelengths)

4.14 TracePro 2022 User’s Manual


Surface Source Properties

FIGURE 4.11 - Flux Source (requires Discrete Wavelengths)

TracePro 2022 User’s Manual 4.15


Applying Properties

Source Type Source Property - Uses a Surface Source Property to determine the spectral
distribution, units, and total flux or irradiance to be emitted by the surface
source. Uses either discrete wavelengths (see Flux or Irradiance below) or cal-
culated wavelengths (see Blackbody or Graybody below).
Flux—The total power emitted by a surface. Flux sources distribute the power
uniformly over the surface area. The rays are emitted from the surface at ran-
dom positions. Flux sources emit rays in discrete wavelengths. A portion of the
total flux is allocated to each wavelength according to the wavelength weight.
The number of rays for each wavelength is calculated to give each starting ray
approximately the same flux, regardless of wavelength.
Irradiance—Irradiance sources emit a specifed flux per unit area. Thus, a
larger total area provides a higher total flux. They use discrete wavelengths. .A
portion of the total flux is allocated to each wavelength according to the wave-
length weight. The number of rays for each wavelength is calculated to give
each starting ray approximately the same flux, regardless of wavelength.
Blackbody—Blackbody sources require a temperature value and calculated
wavelengths to calculate irradiance emitted by the source surface. TracePro
uses wavebands to approximate a continuous spectrum. It calculates a spec-
trally-weighted wavelength to represent each waveband. In the calculation,
TracePro distributes the number of rays per waveband to generate rays with
approximately equal flux. The Min Rays field specifies the minimum number of
rays to be emitted in each waveband.
Graybody—Graybody sources require a temperature, an emissivity value,
and continuous wavebands to calculate irradiance on a source surface. Trace-
Pro uses wavebands to represent a continuous spectrum. It calculates a spec-
trally-weighted wavelength to represent each waveband. In the calculation,
TracePro distributes the number of rays per waveband to generate rays with
approximately equal flux. A graybody calculation uses the value in the Emis-
sivity field for determining power distribution over the surface. The Min Rays
field specifies a minimum number of rays to be emitted in each waveband.
Units Specify the type of units, either Radiometric or Photometric (Flux or Irradiance
sources only).
Min Rays Specify the minimum number of rays assigned (by TracePro calculation) to
each wavelength.
Total Rays Request a number of rays to emit from a surface source. For a Flux or Irradi-
ance (discrete wavelength) raytrace, exactly the requested number of rays will
be traced. For a Blackbody or Graybody (continuous wavebands) raytrace,
TracePro will calculate the number of rays based on the values entered, with
the requested number as the goal. The actual number of rays to be traced is
displayed in the Wavelengths grid.
Emissivity For a graybody specify a number from zero to 1 to indicate the emissivity. The
number is used in the calculation of flux emitted by the surface.
Apply Button Apply the new values in the dialog box to the surface source.
Totals  The actual count of rays and flux to be emitted by the surface source, shown in
spreadsheet area of the dialog box.

4.16 TracePro 2022 User’s Manual


Surface Source Properties

View Data When a Source Property type surface source is selected, you can open the
Button Surface Source Property Editor to view the property data by clicking the View
Data button.
Color You can change the color of the rays as they are displayed in the model win-
dow. To make this work you must also change the selection in Analysis|Ray
Colors; choose Source-based ray colors to have rays displayed in the source
color.
Angular  Select Lambertian, Normal to Surface, Surface Absorptance, or Uniform.
Distribution Surface Sources emit light in one of the four angular distributions. Specifying
angles and probabilities for the rays is important for the accuracy of the ray-
trace.
Lambertian — Emits radiation with a cosine-weighted angular distribution.
Normal to Surface — Emits radiation in a direction perpendicular to the sur-
face. This option allows you to use a sphere to generate a diverging spherical
wavefront (as from a point source) or the inside of a spherical shell to generate
a converging spherical wave
Surface Absorptance — Uses the absorptance vs. angle of incidence profile
specified by the surface's Surface Property as an angular emissivity distribu-
tion for emitting rays. The wavelength dependence is also used as the spectral
emissivity for blackbody and graybody sources.
Uniform — Generates rays uniformly into a hemisphere. This allows you to use
a flat surface to simulate a point source, i.e. one with a spherical symmetry.
Rays You can select All rays, Only random rays, or Only importance rays. Impor-
tance sampling must be applied to the surface to have any rays emitted when
Only importance rays is selected.
Discrete Here, a wavelength refers to a single discrete wavelength. For a raytrace that
Wavelengths uses many wavelengths, TracePro lets you optionally specify a mathematical
weight for each wavelength to enhance or diminish the role of the wavelength
in calculations.
Calculated The From and To limits of each waveband are shown. There can be many
Wavelengths wavebands used in a raytrace calculation. TracePro calculates zero or more
spectrally-weighted wavelengths for each waveband, as determined by the
#Inc entry. Each calculated wavelength is the weighted average wavelength in
its waveband increment. For blackbody and graybody sources, the weighting
function is the blackbody spectral emissivity optionally multiplied by the spec-
tral absorptance of the surface property (if Angular Dist. is set to Surface
Absorptance), and for Surface Source Property sources the weighting function
is the spectral emissivity in the property. Rays are traced at the spectrally-
weighted wavelengths. Calculated wavelengths are used with Source Prop-
erty, Blackbody, and Graybody surface sources.

Blackbody Surface Sources


A blackbody absorbs all light incident upon it and emits light in a spectrum derived
from the quantum theory of radiation (the Planck blackbody distribution) in a
Lambertian angular pattern. The spectral distribution of rays depends on the
temperature of the surface.
Approximating a blackbody can be done by creating a cavity and allowing light to
escape through a small hole. Most surfaces are poor approximations to a
blackbody, but some surfaces (e.g. some special black paints) can approach
blackbody performance over a limited range of wavelengths.

TracePro 2022 User’s Manual 4.17


Applying Properties

Note: By Kirchhoff’s law of radiation, the absorptance of a surface is equal to its


emissivity. To rigorously simulate thermal radiation in TracePro, you must select
the Surface Absorptance Angular Distribution. Then TracePro uses the
absorptance of the surface as the emissivity. In this case the surface source is not
a true blackbody, but it accurately simulates thermal emission from the surface. If
you select a different angular distribution, TracePro sets the emissivity to one.

Blackbody and Graybody Calculations


TracePro computes the radiance to be emitted from the surface source for each
waveband defined. The radiance emitted is the integral of the blackbody function
between the two boundary wavelengths that define each waveband,

2

L =     M   T  d , (4.1)

1
where M is the blackbody spectral radiance function,  is the spectral emissivity, T
is temperature,  is wavelength, and L is the emitted radiance.

Prescription Standard Expert

The Prescription selection in the Define|Apply Properties dialog box lets you
specify the sequence of lens surface intersections though which an image-forming
ray travels. TracePro uses prescription (list of surfaces) for three things: (1)
sorting ray paths, (2) automating the set-up of importance-sampling targets, and
(3) testing against the Optical Scatter Intercept Limit during the raytrace.

4.18 TracePro 2022 User’s Manual


Color

FIGURE 4.12 - Prescription data

You can specify the sequence of intersections manually or automatically. This tab
lets you define the prescription automatically by entering the starting position and
direction of the gut ray of the optical system. In an imaging system the gut ray
passes through the center of the field of view and the aperture. It defines the
optical axis. You can also edit the prescription by manually changing the
prescription surface number. A prescription number of -1 applied to a surface
means that the surface is not part of the optical prescription.
See “Automatic Setup of Importance Sampling” on page 4.26.

Color
TracePro defaults to green for the display of objects and surfaces in the model
window and to black when a user selects an object or surface. To change the
default display color, select View|Options and change the color selection. To
change the color of the object or surface, select Define|Apply Properties and
select Color. Choose a new color by selecting the Use custom color button and
then clicking on the color bar to display the color selection palette. Select a color
from the palette or create a custom color. Click Apply to change the color of the
object and/or surfaces selected. The color is saved with the Model data.
When applying colors, the surface color takes precedence over the object color,
and the object color takes precedence over the default color.

TracePro 2022 User’s Manual 4.19


Applying Properties

FIGURE 4.13 - Color selection

Object colors may also include transparency. Transparency is specified from 0.0 -
1.0 where 0.0 is opaque and 1.0 is invisible. The values are set for Red, Green
and Blue components of the color. Setting Red to 1.0 and Green, Blue to 0.0
would make the object fully transparent to Red objects but opaque for Green and
Blue objects. Transparency only affects the display of rendered objects in the
Model Window.

Importance Sampling Standard Expert

Importance sampling is a Monte Carlo technique in which rays are generated and
propagated in specific directions in the optical system, which are “important” in
determining the results you need. This improves sampling by increasing the
number of rays reaching the surface or surfaces of interest to you. For a
conceptual explanation of Importance Sampling, including a section titled “When
Do I Need Importance Sampling?”, see “Importance Sampling” on page 7.2 in the
Technical Reference chapter.
Importance Sampling can be applied to improve ray sampling for the following
applications:
• Surface Scatter
• Bulk Scatter (see “Bulk Scattering” on page 4.6)
• Diffraction (see “Diffraction” on page 4.32)
• Surface Sources (see “Surface Sources” on page 5.22)

4.20 TracePro 2022 User’s Manual


Importance Sampling

The solid angles for importance sampling are defined by circular, annular, or
rectangular planes called importance sampling targets. These virtual targets are
not part of the solid model and are used only for importance sampling.
The Importance Sampling Targets are defined in one of two ways, manually or
automatically. The Automatic Setup Of Importance Sampling can be used for
optical systems for which a sequential prescription of surfaces can be defined,
and is usually used for stray light analysis an imaging system. Models containing
multiple potential stray light paths require manual setup of the targets. It is also
possible to use the Automatic Setup to define Importance targets, and then add
additional targets manually.
There are two classes of importance sampling targets, one for surfaces and one
for objects. Surface importance sampling targets are applied to surfaces and
affect rays generated from surfaces, i.e. due to surface scatter, aperture diffraction
and emission by surface sources. Object Importance sampling targets are used
for generating bulk scattered rays and emitted fluorescence rays.
Once Importance Sampling targets have been defined, they can also be edited,
deleted and displayed. See “Display Importance” on page 2.55.

Defining Importance Sampling Targets Manually


You can manually specify importance sampling targets by selecting
Define|Apply Properties and choosing Importance Sampling (see Figure
4.14). The Importance Sampling targets dialog box allows you to directly specify
the location, orientation, and dimensions of importance sampling targets. You can
choose either Rectangular or Annular importance targets.
Note: Importance Targets may be displayed in the Model Window. See “Display
Importance” on page 2.55.

TracePro 2022 User’s Manual 4.21


Applying Properties

FIGURE 4.14 - The Apply Properties dialog box - Importance Sampling data

The steps required to manually define Importance Targets are as follows:


1. Press Add to define a new importance sampling target.
2. Specify the number of importance rays. This is the number of rays generated
upon scatter, diffraction, and so forth that are directed to or away from the
Importance Target.
3. Specify the direction of the importance rays (either toward or away from the
target).
4. Select the shape of the importance sampling target and enter the parameters
for the location, orientation, and dimensions of the target.
5. Press Apply to store the information and update the surface with the
Importance Sampling Property.
These five steps are discussed in more detail in the sections below.
Importance sampling can be further enhanced by specifying more than one
importance sampling target for a given scattering surface. As many importance
sampling targets as you wish can be specified for each scattering surface.

4.22 TracePro 2022 User’s Manual


Importance Sampling

TABLE 4.3. Fields in the Importance Sampling Dialog Box


Target Target to add or modify.

Ray/cell Specify the number of rays you want to go toward (or away from) the target.

Direction Specify ‘Toward’ or ‘Away’ depending on whether you want the rays to go
toward the selected importance sampling target or away from it.

Shape Specify ‘Annular’ or ‘Rectangular’ as the shape of the importance sampling tar-
get. The remaining dialog box options vary depending on which of these two
you have selected.

Target Center Specify the coordinates x, y, and z to establish the position of the importance
sample surface.

Normal Vector Specify the direction x, y, and z to establish the target normal.

Up Vector Specify the direction x, y, and z to establish the up direction or height.

Target Size Specify Outer and Inner radius for Annual target or the X and Y widths for rect-
angular targets you have selected. An annular region with a zero inner radius
will be an circle.

Cells Specify the number of segments to use for the target. One segment is the
default. For more information about “Cells”, see page 4.24.

Add Button Press this button to add an importance sampling target as currently defined by
the rest of the dialog box. To associate importance sampling with a particular
surface, you must first select that surface in your model before you press the
Add Button.

Apply Button Press this button when you have completed defining or editing properties for
the selected importance sampling target so that the changes take effect.

Delete Button Press this button to delete the displayed Importance Target

Adding Targets
To add an importance sampling target:
1. Select Define|Apply Properties.
2. With the Apply Properties dialog box open, select the Importance Sampling
tab.
3. Select a surface (for surface scatter, diffraction, or surface source) or object
(for bulk scatter) to which to apply an importance sampling target. Note that in
the dialog box, a small drop-down box displays the number of importance
sampling targets currently defined on the surface that you select.
4. Press the Add button to add an empty target.
5. Enter the values for the target direction, shape, size and orientation.

TracePro 2022 User’s Manual 4.23


Applying Properties

6. Enter the number of rays to target to each cell.


7. Press Apply to save the data and apply the target.
You can also reach the manual setup of importance sampling by clicking the
model window with the right mouse button, then by selecting Properties from the
pop-up menu obtained.

Number of Importance Rays


Importance sampling will collect the flux from a random ray, caused by scattering
for example, and aim it towards the defined target. The flux can be divided into
multiple rays to improve the sampling of the ray trace by directing many rays
toward each importance sampling target
If the importance sampling target subtends too large a solid angle OR the BSDF
of the surface varies significantly (more than an order of magnitude) over the
subtended angle OR if more sampling is desired, divide the target into cells.

Shape, Dimensions, and Location of Importance Targets


When setting up importance sampling targets manually, it is important that the
solid angle subtended by the importance sampling target is less than one
steradian. It might be necessary to select multiple samples to keep the solid angle
of each segment small. This is especially important if the BSDF varies strongly
with angle (for example, for a polished surface such as a mirror or lens). Reducing
the size of the target or using multiple cells can overcome this issue.

Cells
When it is important to have more uniform sampling than is provided by pure
random sampling, use this option to divide each dimension of the target into
segments, creating smaller cells in which random ray aiming points are selected.

Stratified Importance Sampling


If the importance sampling target subtends too large a solid angle, or the BSDF of
the surface varies significantly (more than an order of magnitude) over the
subtended angle or if more uniform sampling is desired, you should divide the
importance sampling target into cells to create a stratified target. A circular or
annular target is partitioned into segmented rings of equal area as shown in
Figure 4.15. This is done by dividing the annulus equally in angle and calculating
radii to give equal area to each cell.

4.24 TracePro 2022 User’s Manual


Importance Sampling

FIGURE 4.15 - Stratified annular (circular in this case) importance sampling


target with four radial segments and four azimuthal segments. The 16
resulting cells all have equal area.

The radii of the rings are determined by the formula

A
ri + 1 = ------ – r i 2 (4.2)
n
where n is the number of rings, the ring edges are numbered 0,...i,...n, A is the
2 2
area of the annular target ( A =   R outer – R inner  ), and ri is the radius of ring edge i.
r0 is equal to Rinner, the inner radius of the annular target. For a circular target,
Rinner = 0.
A rectangular target is partitioned into segmented rectangles of equal area as
shown in Figure 4.16.

FIGURE 4.16 - Rectangular target with 2x3 (XxY) segments.

Rectangular segments are all the same shape as well as being equal in area.
To specify the segmentation of an importance sampling target, select the number
of cells in each direction (radius and angle for an annular target, x and y for a
rectangular target).

TracePro 2022 User’s Manual 4.25


Applying Properties

Apply the Importance Sampling Property


Once the number of importance rays, the direction of the importance rays, the
shape of the importance target and the location, orientation, and dimensions of
the target have been defined, verify that the proper surface or object is selected in
the System Tree, and click Apply to apply the Importance Sampling Property.

Automatic Setup of Importance Sampling


For complex optical systems of many lenses that require scatter and stray light
analyses, manually defining the importance sampling targets for each surface is
complicated and time-consuming. TracePro lets you define Importance Sampling
targets for all the optical surfaces automatically.
The following discussion assumes you are familiar with the terminology of optical
imaging.

Define the Prescription


Prior to the automatic set up of importance sampling targets, you must first define
the prescription, which is a sequence of surfaces that light rays pass through. Use
the prescription tab of the Define|Apply Properties dialog box to define the
prescription. For more information about “Prescription”, see page 4.18.

Select the Target Shape


After the prescription is correctly set up, select the Define|Auto Importance
Sampling dialog box, labeled Automatic Setup of Importance Sampling (see
Figure 4.17). Specify the importance sampling target shape as annular or
rectangular for the surfaces in the prescription.
Choose the target shape (annular or rectangular) that most closely matches the
shape of the field of view of the optical system. You can choose a circular field of
view by selecting the Annular radio button.

4.26 TracePro 2022 User’s Manual


Importance Sampling

FIGURE 4.17 - Automatic Setup of Importance Sampling Dialog Box

Specify a gut ray, marginal ray, and one or two chief rays.
Gut Ray A ray passing through the center of the aperture stop and the center of the
field of view.

Marginal Ray A ray passing through the edge of the aperture stop and the center of the field
of view.

Chief Ray A ray passing through the center of the aperture stop and the edge of the field
of view. For an Annular target specify an Outer Chief Ray and an Inner Chief
Ray. For a Rectangular target specify a Height Chief Ray and the Width Chief.

In some cases, it is helpful to use a lens design program such as OSLO to


determine the starting positions and directions of the rays. Two chief rays are
needed to define rectangular or annular targets. To define circular importance
sampling targets, select Annular and leave the data for the Inner Ray set to all
zero.
Note: If the gut ray is blocked by the optical system (e.g. by the secondary mirror
in a Cassegrain Telescope) move the gut ray to the inner edge of the obscured
aperture, keeping its direction the same.

Annular Targets
To define importance sampling for annular targets, enter the required data for the
rays. The Inner Ray is one that passes through the center of the aperture stop and
the inner edge of the annulus, as shown in Figure 4.18. The Outer Ray passes
through the outer edge of the annulus, on a line passing through the Gut Ray and
Inner Ray points.

TracePro 2022 User’s Manual 4.27


Applying Properties

FIGURE 4.18 - Ray locations for automatic setup of importance sampling


targets with an annular field of view

Rectangular Targets
To define importance sampling for rectangular targets, enter the data for the rays.
The Height Ray passes through the center of the aperture stop and the center of
one edge of the image rectangle, as shown in Figure 4.19, and the Width Ray
passes through the center of an adjacent edge. The Marginal Ray passes by the
edge of the aperture and meets the image field at the same location as the Gut
Ray. TracePro calculates the distance and location of the image field from the
meeting point of Marginal and Gut Rays.

FIGURE 4.19 - Ray locations for automatic setup of importance sampling


targets with a rectangular field of view

4.28 TracePro 2022 User’s Manual


Importance Sampling

Apply, Cancel, or Save Targets


Once the prescription is defined, the target shape is selected, and the gut,
marginal, and chief rays are specified, click on one of the buttons at the bottomo f
the dialog:
• OK: This will trace the rays defined and perform the importance sampling
setup. The dialog will be closed.
• Cancel: This will close the dialog without tracing any rays. All updated data
will be lost.
• Save: This will add Grid Sources corresponding to the four rays defined in the
dialog. No rays are traced. Each time the button is pressed new Grid Sources
are added to the model. To trace you must trace the rays per a grid/all source
ray trace.

Editing/Deleting Importance Sampling Targets


You can check and edit the manually or automatically defined importance
sampling targets using the Importance Sampling tab of the Define|Apply
Properties dialog box. Select the surface with the Importance Sampling tab
open, then select the importance sampling target you want to edit from the drop-
down list. Make changes to the parameters in the dialog box, then select Apply.
To delete an importance sampling target, select the importance sampling target
number from the dialog box drop down list. Click the Delete button to remove the
importance sampling target.

TracePro 2022 User’s Manual 4.29


Applying Properties

Exit Surface
When using Simulation Mode to reduce the length and burden of computations,
you must designate one or more surfaces as Exit Surfaces to display Irradiance
Maps.

FIGURE 4.20 - Exit Surface data in Apply Properties dialog box

TracePro optionally collects flux and incident ray coordinates and directions for
each surface in addition to collecting data for candela plots. Rays do not
necessarily “exit” on this surface, but this is a commonly used term for this
surface.
Once the Exit Surfaces are defined, rays may be traced in Simulation Mode. To
view analysis output, Select a surface as if using Analysis Model and display the
plot. If the plot is displayed and no selection is made the data from the first Exit
Surface defined will be used. If an object or non-exit surface is selected a
message will be displayed in any open plots or tables requesting the selection of a
valid Exit Surface.
Before beginning a raytrace in Simulation Mode, you must first specify the exit
surface(s). Do this by the following sequence:
1. Select the surface for which you want to collect flux and irradiance data.
2. Select Define|Apply Properties to open the dialog box.
3. Choose the Exit Surface tab in the dialog box.
-
4. Check the Exit Surface check box.
5. Click the Apply button at the bottom of the dialog box.

4.30 TracePro 2022 User’s Manual


Exit Surface

TABLE 4.4. Exit Surface Options.


Exit surface Set the check box to enable/disable the surface’s Exit surface property.
Number of Set the number of ray to trace during Reverse Raytrace (Standard and Expert
reverse rays Only)
Name Selects one of the Predefined Irradiance Map orientations.
Add Add a new Irradiance Map orientation.
Modify Modify a new Irradiance Map orientation.
Delete Delete a new Irradiance Map orientation.

Standard Expert The Exit Surface dialog is used to define the number of Reverse Rays to trace
when using Reverse Raytrace. See “Reverse Ray Tracing ” on page 5.36.

Predefined irradiance map orientation


The Predefined irradiance map orientation is used to define the Normal and Up
vectors for Irradiance Maps and the Irradiance Map viewer. See “Irradiance/
Illuminance Viewer” on page 6.72. The data and dialog are shown in Table 4.5
and Figure 4.21 respectively.
TABLE 4.5. Irradiance Map Orientation Options.
Name Sets the Predefined Irradiance Map orientation name.
Normal Vector The Normal Vector is a vector in 3D space that is used to orient the
projection plane for the irradiance map. The plane is defined to be per-
pendicular to the Normal Vector, and the irradiance incident on the
selected surface is projected onto this plane.
Up Vector The Up Vector is a vector in 3D space that is used to orient the projec-
tion plane for the irradiance map. The plane is defined so that the Up
Vector is parallel to the vertical side of the plane. The irradiance inci-
dent on the selected surface is projected onto this plane.

FIGURE 4.21 - Irradiance Map orientation dialog

TracePro 2022 User’s Manual 4.31


Applying Properties

Diffraction Standard Expert

Aperture diffraction is light “bending around obstacles.” TracePro can model edge
diffraction, also called aperture diffraction, which occurs when light is partially
blocked by an edge. The method TracePro uses for modeling diffraction is
asymptotically correct, i.e., it is correct for large-angle or wide-angle diffraction.
This asymptotic method is based on the Heisenberg Uncertainty Principle for
photon position and momentum (ref. Freniere et al, Proc SPIE Vol. 3780 (1999)).
(See “Aperture Diffraction Example” on page 9.22.)

Defining Diffraction in TracePro


Diffraction results in interference downstream from the obstacle. When light
passes an obstacle and part of it is blocked by the obstacle, diffraction occurs.
This physical process places a limit on the resolution of a lens and may cause
stray light.
Diffraction is an interference phenomenon. When light waves propagate
unobstructed, they are continuously and constructively interfering as they
propagate. In other words, the interference pattern is in some state of equilibrium,
providing a wavefront that describes the propagation from each point of the
emitter. When a wave is interrupted by an obstacle, the wavefront equilibrium is
upset. Thus, interference ripples occur upon further propagation. In the far field,
an equilibrium is reestablished. When a wave is interrupted by an obstacle, the
wavefront is suddenly incomplete. Interference ripples occur.
A two-dimensional diffraction-interference phenomenon can be observed when
water waves strike a breakwater. A long, straight wave striking a breakwater (with
the wave parallel to the breakwater) results in approximately circular waves
emanating from the end of the breakwater. Far away from the breakwater, the
original straight wave continues uninterrupted. The circular wave interferes with
the straight wave in the “slit” region, causing interference maxima and minima--
and causes waves to go into the “shadow” region where the casual observer
might not expect waves to go at all. This effect is analogous to the diffraction of
light.
A complete theoretical treatment of diffraction is a mathematical subdiscipline of
physics, and is beyond the scope of this manual. For the interested reader, an
introductory treatment of diffraction can be found in most any optics textbook.
Some additional technical details can also be found in the Technical Reference
section.

Do I need to Model Diffraction in TracePro?


TracePro’s implementation of diffraction modeling is designed for stray light
analysis and for system transmission studies of specialized optical instruments
where diffraction might have a significant effect on transmittance.
Generally, image quality diffraction studies are done using optical design software
such as OSLO.
If you are modeling diffraction for stray light, it is necessary to define importance
sampling for each diffracting aperture in the optical system. The importance

4.32 TracePro 2022 User’s Manual


Using the Raytrace Flag

sampling target for the diffracting aperture is applied to the surface that is defining
the edge of the aperture.

How do I Set Up Diffraction?


Diffraction occurs in TracePro at a surface on which a diffraction property is
defined. Setting up diffraction on a surface consists of four steps:
1. Select a surface on which you want to model diffraction. It can be the surface
of a mirror or lens. If there is no surface where you want to model diffraction,
you must define a “dummy object.” Locate the dummy object where you want
the diffraction to occur, and select one surface of the object.
2. Place a check in the Aperture Diffraction check box located on the Diffraction
tab of the Define|Apply Properties dialog box.
3. Set the Aperture Diffraction check box in the Raytrace Options dialog box
found on the Analysis menu. This turns on diffraction for the current model.
4. Add importance targets to the aperture surface. For more information about
“Importance Sampling”, see page 4.20.

Using the Raytrace Flag


The raytrace flag property lets you exclude an object from a raytrace, which can
speed up the raytrace. During the audit prior to the start of a raytrace, messages
are displayed in the Macro/ Message Window to remind you which surfaces you
have excluded from the raytrace.
To exclude an object from the raytrace, select the object. Select Define|Apply
Properties and then select Raytrace Flag. Uncheck the check-box and click
Apply.

Mueller Matrix Standard Expert

You can create and apply a polarizing element to a TracePro object by specifying
its Mueller matrix. TracePro uses the Stokes vector-Mueller matrix method
(Mueller calculus) for modeling polarized light.
Use the Define|Apply Properties dialog box and select Mueller Matrix to apply
polarization to a TracePro object. You can specify the polarization state of Grid
Source rays using the Grid Source dialog box, Polarization tab.

TracePro 2022 User’s Manual 4.33


Applying Properties

FIGURE 4.22 - The Apply Properties Dialog Box - Mueller Matrix

If you specify a Mueller matrix, you must also specify its orientation. Do this by
specifying the “Up Direction” vector and the “Propagation Direction” vector at the
bottom of the dialog box. Orientation vectors are specified in global coordinates.
The direction vector specifies the direction in which light is traveling when the
Mueller matrix has the specified effect.

4.34 TracePro 2022 User’s Manual


Mueller Matrix

TABLE 4.6. Mueller Matrix Options.


Component Selects one of several predefined types of polarizing components.
Transmission Orientation in degrees for Linear Polarizer.
Axis
Handedness Choice of Left or Right for Circular Polarizer and Circular Halfwave
Retarders.
Fast Axis to X Orientation in degrees for Linear Quarterwave Retarders and Linear
Axis Halfwave Retarders.
Mueller Matrix Displays the terms of the 4x4 Mueller Matrix for the current polarizing compo-
nent. This is also used in the Custom component is selected to define the
polarizer. These must be normalized terms.
Propagation Global propagation direction of the object. This is automatically be updated if
Direction the object is rotated or moved.
Up Direction Up direction in global coordinates of the object. This automatically be updated
if the object is rotated or moved.
Apply Apply or update the property data to the object(s).
Delete Remove the property from the object(s).
If you know the values of the Mueller Matrix or the component does not conform to
one of the standard types select the Custom Component. The following options
are displayed.
TABLE 4.7. Options for Custom Mueller Matrix Data Entry.
Manual Entry Enables direct entry into the Mueller Matrix array.
Compensator Displays the Phase Difference options. Phase Difference is entered in
degrees or radians.
Rotator Displays the Rotation Angle option. Rotation Angle is entered in
degrees or radians.
Linear Polar- Displays the Orientation Angle option. Orientation Angle is entered in
izer degrees or radians.
When a ray traverses an object, the Stokes vector of the ray is transformed to the
coordinate system of the Mueller matrix and then multiplied by the Mueller matrix
to determine the new polarization state of the ray. Any flux that is absorbed by the
Mueller matrix is recorded as the ray enters the object. That is, the incident flux on
the surface as the ray leaves the object is lower in the amount absorbed by the
Mueller matrix, similar to bulk absorption.
A Mueller matrix is a 4x4 matrix and a Stokes vector is a column vector of length
4. Therefore, multiplying a Stokes vector by a Mueller matrix produces a new
Stokes vector. In this way a Stokes vector can be propagated through an optical
system. For example, a Mueller matrix that does nothing is the unit matrix,

1 0 0 0
0 1 0 0 ,
0 0 1 0
0 0 0 1
while a horizontal polarizer is represented by

TracePro 2022 User’s Manual 4.35


Applying Properties

0.5 0.5 0 0
0.5 0.5 0 0 .
0 0 0 0
0 0 0 0
The Stokes vector for unpolarized light is

1
0 ,
0
0
while the Stokes vector for perfectly horizontally polarized light is

1
1 .
0
0
There is a collection of example Mueller matrices and Stokes vectors in the
Technical Reference section. Discussions and examples of Mueller matrices and
Stokes vectors can be found in many textbooks (for example, E.L. O’Neill,
Introduction to Statistical Optics, Dover, ISBN: 0486673286 (1992); E. Collett,
Polarized Light: Fundamentals and Applications, Dekker, ISBN: 0824787293
(1992); Shurcliff and Ballard, Polarized Light, van Nostrand (1964); Kliger, Lewis,
and Randall, Polarized Light in Optics and Spectroscopy, Academic Press, ISBN:
0124149758 (1990)).
Mueller matrices must be defined with care – it is quite possible to create a
Mueller matrix that is impossible, i.e. one that creates a resulting Stokes vector
that is not physically possible.

Temperature Standard Expert

TracePro has a Surface and Object property for temperature. Material and
Surface properties have data based on wavelength and temperature. During the
raytrace audit the property data is updated to reflect the current surface and
object temperatures. If an object has a defined temperature but the surfaces do
not, the object temperature is applied to the surfaces. If no temperature is defined,
the default value for the property is used.
As an example, consider a simple material property named “Temperature,” which
has an index of 1.5 for 300K and 2.5 at 500K. The raytrace for the two cases is
shown. The flux threshold has been set to 5% to eliminate most Fresnel
reflections.

4.36 TracePro 2022 User’s Manual


Temperature

FIGURE 4.23 - Raytrace of block with example “Temperature” material


applied, with n = 1.5 at T=300K

FIGURE 4.24 - Raytrace of block with example “Temperature” material


applied, with n = 2.5 at T=500K

TracePro 2022 User’s Manual 4.37


Applying Properties

FIGURE 4.25 - Apply Properties Dialog Box, Temperature

Temperature is applied like any other property, through the Apply Property dialog
box. After selecting the objects and surfaces of the same temperature, enter the
new temperature and press Apply to update the model.
For surface temperatures, you can define a temperature distribution that varies
continuously over the surface. See “Temperature Distribution” on page 4.53.
Temperature is entered in units of degrees C, degrees F, or Kelvin.
Note: If a property is defined at only a single temperature, the surface and object
temperatures are effectively ignored.
Note: The Default temperature is set in View|Options.

Class and User Data Standard Expert

The Class Data feature lets a user apply a string attribute and numeric data to one
or more objects. The Class Name is displayed in various outputs and is accessible
from the macro language. See the online Macro Reference for further information
on specific macro commands.
To apply class data to one or more objects:
1. Select the objects using the Edit|Select|Objects tool.
2. Open the Apply Properties dialog.
3. Select the Class and User Data tab and enter the name to be applied.
4. Press Apply to update the object selection. The Class Name and User Data
values will be attached to the object.

4.38 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 4.26 - Apply Properties Dialog Box, Class and User Data

User data is also available to apply numeric data to one or more objects. This data
may be used during macro operations to store values used during the course of
ray tracing.
The Property Report and System Tree display the applied Class and User data.
The Online Macro Reference provides detailed descriptions of the macro
commands used with Class and User data. See property:get-user-data and
property:get-class.

RepTile Surfaces Expert

Overview
When modeling objects that have many small repeated structures, it may be
infeasible to create the structures using TracePro or any other solid modeling
program. For example, brightness-enhancing films used in flat-panel LCDs may
have thousands or millions of repeated surface structure elements. The RepTile
surface feature in TracePro allows you to create these objects by specifying the
shape of one tile, or one column of tiles. This feature allows you to create
complicated models with a great reduction in model size, audit time, and ray-trace
time compared to equivalent models with solid geometry.

TracePro 2022 User’s Manual 4.39


Applying Properties

Specifying a RepTile surface


The process of making a RepTile surface in TracePro is similar to applying a
surface property. TracePro has a database of different RepTile surface shapes
and geometries, and you can define different RepTile parameters and add them to
the database. The database is accessed through the RepTile Property Editor.
Different tile shapes (ring, rectangular, staggered rectangular, and hexagonal) and
tile geometries (conical, spherical, ellipsoidal, hip-roof, cube-corner, prism,
rounded prism, and Fresnel lens) are available. In general, the geometries can be
defined as either “bumps” or “holes”. Once a RepTile property is entered in the
database (see “RepTile Surfaces” on page 4.39), it can be applied to a plane
surface using the RepTile tab of the Apply Properties dialog box. Additional data is
also needed, namely a boundary (rectangular, circular, or the boundaries of teh
object) on the plane surface within which the tiles exist, and the location of a
reference tile (the (0,0) tile). These data are entered in the RepTile tab of the
Apply Properties dialog box.

Important note: You can avoid ray tracing errors in RepTile by avoiding
coincident surfaces. For example, avoid having boundary dimensions that place
the RepTile boundary coincident with a tile boundary, or vice versa. Likewise, do
not create features within tiles that have surfaces that are coincident with tile
boundaries. The RepTile ray tracing engine is optimized for speed and does not
check for such coincident surfaces.

FIGURE 4.27 - RepTile Property data

4.40 TracePro 2022 User’s Manual


RepTile Surfaces

TracePro permits one RepTile property per Surface. So a Block with 6 surfaces
could have up to 6 RepTile properties, one on each surface.
When you apply a RepTile property to a plane surface, TracePro defines a “cell”
containing the tiled space. The cell has the shape of the boundary (circular,
rectangular, or surface bounds) and a calculated depth. If the RepTile property is
Parameterized then the cell depth is entered in the dialog. Otherwise the depth of
the cell is as follows:
• The depth or height, d, of the deepest or highest geometry is calculated.
• A buffer of 0.001 mm is added to each side.
The total depth of the cell is d + 0.002 mm, and all geometry surfaces are at least
0.001 mm from the top and bottom planes that bound the cell. You must be aware
of this calculated depth, because the cell must be completely contained within the
object that owns the RepTile surface. If this rule is violated, incorrect rays will
result. Another way to think of this is that the cell “sticks into” the surface by a
distance d + 0.002 mm (this is true for both “holes” and “bumps”). There must also
be a margin around the edges of the cell. That is, the cell boundary should not be
coincident with any surface of the object in order for rays to escape. This margin
can be small, e.g. 0.001 mm, but it should not be zero or errant rays will result.

FIGURE 4.28 - A completed RepTile Surface. The tiled region has a


rectangular boundary, and the tiles are rectangular with conical
geometry. The tile numbering increases along the x and y axes. Tiles
along the local x axis are in rows, and those along the local y axis (the
Up vector) are in columns.

The orientation of tiles in a RepTile surface is determined by the Tile Up Vector


you enter when applying the RepTile Surface property to a surface. The direction
of the Tile Up Vector defines the local y axis of the tiles, the plane normal vector

TracePro 2022 User’s Manual 4.41


Applying Properties

defines the local z axis, and the local x axis is orthogonal to the y and z axes and
forms a right-handed coordinate system. The boundary is oriented according to
the Boundary Up Vector entered. The Height of the boundary is measured along
the Boundary Up Vector. The width of tile shapes and geometry is the dimension
along the local x axis, and the height is along the local y axis (the Tile Up vector).
Depth/height of “bumps”/ “holes” is along the local z axis.
Figure 4.28 shows a rectangular plane surface with a RepTile Surface property
applied to it. You specify the (x, y, z) location of the (0,0) tile. The tile numbering
increases along the x and y axes. The tile directly above the (0,0) tile is (0,1), and
the tile to the right of the (0,0) tile is (1,0). In general, a tile is referred to by its
coordinates (nx,ny). When you select variable geometry, the geometry varies as ny
varies, so that for a given ny, all the nx tiles are the same as shown in Figure 4.28.
When you enter the coordinate of the (0,0) tile, it doesn’t have to be on the
surface. If it is above or below the surface, the point will be projected onto the
surface along the surface normal. If the point is outside the boundary of the
surface, some of the tiles (or fractions of tiles) will not be used, but this is a
perfectly valid way to use the RepTile Surface feature.

Depth for Parameterized Reptile


When a RepTile property is defined as Parameterized, the depth is entered in the
Apply Properties Dialog. These properties allow the RepTile feature to be
truncated by or immersed in the Object containing the property.

Top tangent
Truncated to surface
Immersed

FIGURE 4.29 - Parameterized Spherical Bumps at three different depths.

Figure 4.29 shows an example using Spherical Geomerty for three different
Boundary Depths.
• The Truncated case has a Boundary Depth less than the Geometry Depth.
• The Immersed case has a Boundary Depth greater than the Geometry Depth.
• The third case has the two depths being equal.
The horizontal line below the sphere is the Boundary surface defined by the
RepTile property.

Boundary Shapes
Circular boundary
You specify a circular boundary by a center point (x, y, z) and a radius. When you
specify a circular boundary, TracePro creates a disk-shaped cell to contain the

4.42 TracePro 2022 User’s Manual


RepTile Surfaces

tiles. It is important that circular boundary be completely inside the boundaries of


the surface, otherwise ray tracing errors will result.

Rectangular boundary
You specify a rectangular boundary by a center point (x, y, z), Boundary Up vector,
width, and height. When you specify a rectangular boundary, TracePro creates a
rectangular cell to contain the tiles. It is important that rectangular boundary be
completely inside the boundaries of the surface, otherwise ray tracing errors will
result.

Use Surface Bounds


No additional data is needed to define this type of boundary.
When you use the surface bounds as RepTile bounds, TracePro assumes that the
surface to which the RepTile is applied is on a convex part of the object. Imagine
two infinite planes that define the top and bottom of the RepTile cell. Rays may
enter the RepTile cell from outside the object in either of two ways: 1) by
intersecting the surface to which the RepTile is applied: or 2) by intersecting
another surface of the object between these two infinite planes. With this type of
boundary, a ray can enter the RepTile cell from inside the object only by
intersecting the bottom plane.

Export
The RepTile surface information can be exported to a file. TracePro provides a
text format containing the a description of the property with defining data. The
geometry can be exported as a 2 dimensional mask or 3 dimensional wireframe in
DXF format. In all cases, the property must first be applied to a surface to enable
the Export function.

Visualization and Surface Properties


See “Display RepTile” on page 2.54.

TracePro 2022 User’s Manual 4.43


Applying Properties

Rays

A B C
Object with Object with Grid raytrace on
real features RepTile property RepTile surface

FIGURE 4.30 - Cross section of different representations of objects - each


with a surface containing spherical “bumps”.

Figure 4.30 shows different representations of objects containing an array of


spherical “bumps” applied to the left hand side of an object in the TracePro Model
Window. Figure 4.30A shows the side profile of an object as it would appear when
the surface “bumps” are created as a true solid model. In order to create this
object, several spheres had to be unioned together into a single solid model
object. Figure 4.30B shows the side profile of an alternate approach: a RepTile
surface is applied which represents the same geometry as that in Figure 4.30A.
You can clearly see that the RepTile surface features are not displayed in the
object of Figure 4.30B. Figure 4.30C illustrates the recommended way to visualize
a RepTile surface: a Perfect Absorber surface property is applied to the RepTile
surface and a single column of closely spaced rays is traced using a grid raytrace.
The ends of the rays, as they become absorbed by the RepTile surface, display
the profile of the surface geometry.
Two different surface properties can be applied in different ways on the same
RepTile surface. As shown in Figure 4.31, a surface property can be applied to
RepTile features by changing the Surface Property in the RepTile tab of the Apply
Properties dialog. Figure 4.31 illustrates that a different surface property can still
be applied to the underlying surface by specifying the Surface Property Name in
the Surface tab of the Apply Properties dialog. Note that any “border” regions of a
tile (i.e. regions around the edge of each tile devoid of a RepTile “bump”, “hole” or
any other feature) are assigned the surface property of the underlying surface.
Likewise, surface properties applied to the underlying surface of the RepTile
surface are also applied to the surface frame which surrounds the RepTile cell
boundary (see notation on schematic in Figure 4.32).

4.44 TracePro 2022 User’s Manual


RepTile Surfaces

Surface Property
applied here

FIGURE 4.31 - Applying a surface property directly to RepTile features in


the Apply Properties dialog. The surface property will apply to the
surfaces drawn with bold lines in the schematic.

TracePro 2022 User’s Manual 4.45


Applying Properties

Surface
surrounding
RepTile

Surface Property
applied here

FIGURE 4.32 - Applying a surface property to the underlying surface of a


RepTile surface in the Apply Properties dialog. The surface property
will apply to the surfaces drawn with bold lines in the schematic.

If you are interested in tracing rays that are absorbed by all regions of the RepTile
surface (as shown in Figure 4.30C), then the surface property of the RepTile
region (Figure 4.31) as well as the surface property of the underlying surface
(Figure 4.32) should both be set to Perfect Absorber.

Specifying a RepTile Texture File Surface


A Texture File property is another method to apply RepTile-type Geometry to
surfaces. Texture Files contain numerical data about the Features that comprise
the RepTile Geometry. After you have defined a property for a RepTile Texture
File, you can assign it to a surface in the same manner that you assign a standard
RepTile property to a surface. For more information about defining a RepTile
Texture File property, see the section titled “Texture File” on page 3.74 in
Chapter 3, 'Defining Properties'.
There are a number of differences between RepTile Textures and standard
RepTile Geometry:
• The data describing the Features comes from an external file that is generated
by other means (e.g., CAD or spreadsheet programs),
• The Texture File must follow a prescribed data format (See “Texture File For-
mat” on page 7.111.),
• Each Feature within the Texture File is distinct, meaning that the Features are
not tiled across the selected RepTile region, but each must be specifically
listed in the TextureFile (thus this file can get quite large),

4.46 TracePro 2022 User’s Manual


RepTile Surfaces

• The Feature data does not have to be in any particular order, such that Feature
spatial positions, size, and so forth can be variable (i.e., random) within the file,
• Multiple Features can inhabit the same RepTile Tile/Pixel,
• Features can overlap with the potential of creating complex structure on the
RepTile surface,
• A Texture File can contain both Bumps and Holes,
• The ability to invert the Bump/Hole designation of each Feature with the use of
the Bump/Hole Button in the RepTile Property Editor,
• The RepTile Buffers are 1 x 10-10 mm, and
• Texture File Features overlapping the RepTile boundary are ignored.
Otherwise, the defining, applying, and ray tracing of RepTile Texture Files is
accomplished the same way as other RepTile Properties. The current capabilities
for the Feature Geometry Types that can be contained within a RepTile Texture
File are shown in Table 3.13 on page 3.55.
Figure 4.33 shows the Apply Properties|RepTile dialog for the case where a
Texture File is applied to the surface. Note that the steps to define this actual
property (TextureExample) are shown in “RepTile Geometries” on page 3.54. You
can set the following parameters:
• Catalog: the catalog in which the RepTile Texture property is located,
• Name: the name of the RepTile Texture property within the selected Catalog,
• Boundary: the shape of the boundary, either Rectangular or Circular, in which
the Features from the RepTile Texture will be located,
• Width and Height: the width and height in model units for the boundary,
• Depth: the depth in model units for the selected boundary. Note that the depth
coordinate varies dependent the on Bump selection (see combo box at the
bottom of Figure 4.33). Detailed information is supplied in “Base Plane Desig-
nation for Textured RepTile” on page 4.52,
• Boundary Center: the boundary center in model units in global coordinates,
• Texture Origin: offset of the Features within the Texture File respect to the
Boundary Center,
• Texture Up: the vector designating the local up vector for the Features,
• Boundary Up: the vector designating the local up vector for the boundary,
• Pixel Heigh and Width: the Tile/Pixel size in the two transverse coordinates.
The default values arise from those entered originally through the RepTile
Property Editor. Designation here indicates the Tile/Pixel Width for the current
surface implementation. It does not overwrite the stored property data, and
• Bump designation combo box: denotes the orientation of the Features (see
“Bump Designation for Textured RepTile” on page 4.48)
1. Bump: all Features treated as bumps,
2. Hole: all Features treated as holes,
3. Mixed: Features as designated in RepTile Texture file, and
4. Inverted: Features are inverted as designated in RepTile Texture file.

TracePro 2022 User’s Manual 4.47


Applying Properties

FIGURE 4.33 - Depiction of the Apply Properties: RepTile dialog for a


property of Texture File type.

Bump Designation for Textured RepTile


You can update the bump and hole designation of the features in a Textured
RepTile property. The four choices are:
• Bump [default]: all features will be interpreted as bumps, which overrides the
designations within the Texture File,
• Hole: all features will be interpreted as holes, which overrides the designations
within the Texture File,
• Mixed: the bump/hole designations are as in the Texture File, and
• Inverted: switches the bump/hole Texture File designations such that bumps
are now holes and holes are now bumps.
You set the default property designation through the RepTile Property Editor, but
you can update it through the RepTile Apply Properties dialog tab (Figure 4.34). If
it is changed via the Apply Properties dialog, it does not change the RepTile
property located and viewed within the Property Database file. It only changes the
property locally (i.e., within the model).

4.48 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 4.34 - Apply Properties RepTile showing a combo box (circled in


red) that allows you to set the feature orientation for this application of
the property.

As an example, a Texture File with the following characteristics is applied to a


plane:
• Mixed bumps and holes, and
• All of the geometry types as listed in Table 3.
A series of figures displays the results of changing the bump designation via the
combo box of Figure 4.34. The figures are:
• Figure 4.35: Mixed features, so the orientations are as specified in the Texture
File,
• Figure 4.36: Bump features, so all features are treated as bumps,
• Figure 4.37: Hole features, so all features are treated as holes, and
• Figure 4.38: Inverted features, so the orientations are inverted as specified in
the Texture File.

TracePro 2022 User’s Manual 4.49


Applying Properties

FIGURE 4.35 - Textured RepTile visualization showing the Mixed orientation


for a RepTile property that originally contains Holes and Bumps.

4.50 TracePro 2022 User’s Manual


RepTile Surfaces

FIGURE 4.36 - Textured RepTile visualization showing the Bump orientation


for a RepTile property that originally contains Holes and Bumps.

FIGURE 4.37 - Textured RepTile visualization showing the Hole orientation


for a RepTile property that originally contains Holes and Bumps.

TracePro 2022 User’s Manual 4.51


Applying Properties

FIGURE 4.38 - Textured RepTile visualization showing the Inverted


orientation for a RepTile property that originally contains Holes and
Bumps.

Base Plane Designation for Textured RepTile


Textured RepTile can handle Texture Files that include both holes and bumps
over the extent of the applied surface property. For a Textured RepTile that
contains both holes and bumps the thickness of the RepTile volume is twice the
depth/height value. The Features radiate from the base plane that is located at a
distance of the depth/height below the applied surface of the object. Additionally,
there is a potential danger in this increase in functionality since one can overlap
the Features in a Texture pattern. Overlapping features will cause:
• Strange geometry, especially when a bump overlaps a hole.
• Ray-trace errors.
We do not recommend having overlapping bumps and holes.
All of the features in a Texture File should be contained in the volume of the object
to which the Texture RepTile Property is applied. This is not an issue for the
standard Bump and Hole feature orientations, but it is for Mixed or Inverted
Textured RepTile properties (see below). For the Mixed and Inverted Textured
RepTile orientations, the overall thickness of the RepTile volume is twice that of
the depth/height value. For these two orientations, the Features radiate from the
base plane which is located at a depth/height below the applied surface of the
object. Thus, for the Mixed and Inverted orientations you must make the overall
thickness of the object big enough to allow for this increased thickness in the
RepTile volume. Table 4.8 describes the location of the base/height/depth
plane(s) to which the Features are referenced. Figure 4.39 shows a graphical
representation of these various planes.

4.52 TracePro 2022 User’s Manual


Temperature Distribution

TABLE 4.8. Descriptions Height/Depth value and the surface to which the RepTile
Property is applied for the Bump, Hole, Mixed, and Inverted Orientations (see
the Section User-Defined Bumps and Holes). See Fig. 23 for a picture.

Feature Orientation Applied Surface of Object Height/Depth Plane


Bump Upper extent to applied Base Plane
RepTile Property
Hole Base Plane Lower extent to applied
RepTile Property
Mixed Upper extent to applied Base Plane
RepTile Property
Inverted Upper extent to applied Base Plane
RepTile Property

Applied Surface of Object


Height / Base
Depth Base Base Base
Height /
Depth
Bum Hole Mixed Inverted
Height/Depth Plane 2x Height/Depth Plane

FIGURE 4.39 - Graphical representation of the planes that define the


configuration of the Features that comprise a Textured RepTile.

Temperature Distribution
A temperature distribution property allows for non-uniform temperature
distributions over a surface. It can be reached via the Temperature Distribution
page in the Define|Apply Properties dialog box. There are several types of
temperature distribution the can be applied to the following surface types:
Plane
• Type 0 - rectangular (x,y) tabular grid of temperature values
• Type 1 - rectangular (x,y) 2D polynomial
• Type 2 - circular (r,?) tabular grid of temperature values
• Type 3 - circular (r,?) 2D polynomial
Cylinder
• Type 4 - cylindrical (z,?) tabular grid of temperature values
• Type 5 - cylindrical (z,?) 2D polynomial
The distribution information is stored in an ASCII file, and can be defined by:

TracePro 2022 User’s Manual 4.53


Applying Properties

• a two-dimensional array of points along the surface with bilinear interpolation


between the given points.
• a polynomial expression, up to fifth order, with user-defined coefficients.
You can enter the origin, dimensions and Local X Axis of the distribution in the
bottom part of the dialog. If the plane or cylinder has simple boundaries then they
can optionally be used for the boundary and orientation of the distribution. A
simple boundary for a plane is either a rectangle or a circle. A simple boundary for
a cylinder is a frustum, i.e. a portion of the cylinder bounded by two planes
perpendicular to the axis of the cylinder.
If the distribution does not cover the entire surface, the temperature applied using
the Temperature property will be used for regions of the surface outside the
distribution boundary. See “Temperature” on page 4.36.
The distribution information stored in the ASCII file can be defined by: a two
dimensional array of points along the surface, with bilinear interpolation between
the given points; a polynomial expression, up to the fifth order, with user-defined
coefficients. See “Non-Uniform Temperature Distributions” on page 7.68.
The temperature distribution, when used with a Surface Property or a Surface
Source Property that has several temperatures defined, enables the property to
vary with temperature spatially across the surface. During a ray-trace, the
temperature is first evaluated by interpolating the temperature distribution for the
ray intersection point, and then this temperature is used to interpolate Property.
This can also be used, indirectly, as a way to make TracePro use a spatially-
varying property. If the temperature is not important in the current analysis, it is
can be effectively used as a parameter to spatially vary the property.

Applying a temperature distribution


To apply a temperature distribution to a plane or cylinder:
• Define the appropriate distribution data in a text file in the correct format.
• Select the surface to which you will apply the distribution.
• Select Define > Apply Properties > Temperature Distribution.
• Type in, or browse to, the file containing the distribution you wish to apply.
• Enter boundary data.
• If the surface has a simple boundary that matches the distribution, you will be
offered a checkbox to use the surface boundary as the distribution boundary.
• Click Apply.

4.54 TracePro 2022 User’s Manual


Introduction to Ray Tracing

CHAPTER 5 Ray Tracing and Optimization

Introduction to Ray Tracing


Ray Tracing is the means by which TracePro simulates the distribution of flux
throughout a model in analysis mode and at selected surfaces in simulation mode.
This chapter contains the logic behind ray tracing in TracePro and the techniques
you can use to enhance your raytrace.
How your rays interact with your model is partly determined by your model itself
(the geometrical details of the objects you created and the properties you
applied), and partly determined by how you control the rays being launched into
your model. There are three basic methods of defining rays: Grid Sources, File
Sources and Surface Sources.

Combining Sources
Sources are defined as Grid, Surface and File. Grid Sources are defined as virtual
windows to a distant source with rays emanating from the window. Surface
Sources are applied as a property to an object’s surface. File Sources are
comprised of external ray data read by TracePro during the ray trace. Multiple
types of each source can be defined and combinations of the three can be made
to control the flux necessary to conduct a desired ray trace simulation.

Managing Sources with the System Tree


Each of the source types can be defined from the Define menu or by Right-
Clicking in the Source tab of the System tree.
The Source tab in the System Tree (see page 1.6) acts as a central repository for
all of the sources contained in the model. Each source is displayed as a node in a
Source Tree. Expanding a node displays the various sources of each type and
further displays the relevant data for each source. Each source node is preceded
by a Green Check or Red X. Clicking on this flag will add or remove the source
from the list of sources to trace.
Selecting a grid, surface or file source in the Source tab of the System Tree will
cause it to be displayed in the Model Window. The displayed color of each source
can be set when defining the source.
As an example, Figure 5.2 shows a model with the Source tab active in the
System Tree. The Grid Source named “Grid Source 1” is selected and the
boundary of the source is displayed in the Model Window. The Model also has a
Surface Source defined but no File Sources. Both the Grid and Surface sources
are enabled for raytracing since the Green Check is set.

TracePro 2022 User’s Manual 5.1


Ray Tracing and Optimization

FIGURE 5.1 - Source Tab displayed in the System Tree.

Managing Sources with the Source/Wavelength Selector


The Source/Wavelength Selector is available from the Raytrace menu. It displays
a summary of all the sources and wavelengths in the model, and allows you to
turn off and on individual sources and wavelengths. To turn off a wavelength or
source, click on the green check-mark to change it to a red x. Figure 5.2 shows
the Source/Wavelength Selector with two sources, one Grid Source and one
Surface Source. The Grid Source has five wavelengths, and the Surface Source
has two wavelengths. You can sort on Source Type, Source Name, or Wavelength
by clicking on a column heading. Clicking on the heading a second time sorts the
column in reverse order.

FIGURE 5.2 - Source/Wavlength Selector with two sources and seven


wavelengths.

5.2 TracePro 2022 User’s Manual


Defining Sources

Defining Sources
This section will discuss how each source type is defined. The following section
will explain how to initiate a ray trace within TracePro. The final section will go
over the various options used to control the raytrace performance.

Grid Sources
For a Grid Source, you specify the spatial and angular distribution of rays in a
regular or random grid. You also specify the number of rays to be traced and the
peak flux. TracePro launches a grid of rays from this imaginary plane.
Upon initial startup a default Grid Source is defined within TracePro. The default
entries in dialog box box can be changed by entering the desired data, then
clicking the Set Defaults button. The entered data is stored in the TracePro
Defaults file. These default values for a Grid Source will be used whenever a new
Grid Source is defined, including when a new model is created and the dialog is
opened for the first time. This data is also saved when the Model is saved as an
OML file. See “User Defaults” on page 1.11 for more details.
The first tab, Grid Setup, provides a set of parameters for defining a grid and is
summarized in Table 5.1. The Grid parameters establish the size, pattern and
location of the grid. Initially, you can think of the grid as a sampling of rays from an
infinitely distant source where all rays are collimated or parallel to each other.
The Grid plane defines a window into the rays passing through boundary and
perpendicular to the plane.

TracePro 2022 User’s Manual 5.3


Ray Tracing and Optimization

FIGURE 5.3 - From the Define menu, the Grid Source dialog box

5.4 TracePro 2022 User’s Manual


Defining Sources

TABLE 5.1. Grid Source Options - Grid Setup

Grid Setup tab

Attribute Value(s)
Name The name of the grid source as displayed
in the Source pane of the System Tree. To
make a new grid source, type the name of
the source and click Insert. To edit an
existing Grid Source, select it in the
Source Tree. To rename a source, once
you have selected it, type the new name
and click Modify.
Grid Boundary Annular
Rectangular
Grid Dimensions Inner & outer radius (Annular)
Y half-height & X half-width (Rectangular)
Grid Pattern Rectangular
Circular
Cross
Dithered rectangular
Random
Checkerboard
Grid density Number of rings (circular pattern), OR
X points & Y points (rectangular, cross, or
dithered grid pattern), OR
Not applicable (random grid pattern), OR
X major points, Y major points, X minor
points & Y minor points (checkerboard)
Number of rays to trace Calculated rays per wavelength (rectangu-
lar, circular, cross, dithered grid pattern, or
checkerboard), OR
Total rays for all wavelengths (random grid
pattern)
Units Units for the flux to be emitted by the
source, either Radiometric (Watt or Watt/
m2) or Photometric (lumen or lux).
Flux per ray, Total flux, or Total Irradi- User defined
ance
Center coordinates of grid x, y, z coordinates of origin
Orientation of grid x, y, z Normal and Up vectors OR
x, y, z Euler rotation angles
Color Opens a color palette to choose the dis-
played color of the source in the Model
Window

TracePro 2022 User’s Manual 5.5


Ray Tracing and Optimization

Table 5.2 lists the Beam options of a Grid Source. The Beam options alter the
spatial and angular profiles of the grid.

TABLE 5.2. Grid Source Options - Beam Setup

Beam Setup tab

Attribute Value(s)
Spatial profile of beam Uniform
Gaussian
Spatial weighting of beam uniform flux & weighted position OR
uniform position & weighted flux (Gauss-
ian)
Spatial Dimensions of Beam (Gaussian x waist 1/e2 radius
only)
y waist 1/e2 radius
Angular profile of beam Uniform
Gaussian
Lambertian
Solar
Angular weighting of beam Uniform flux & weighted angle OR
Uniform angle & weighted flux
(Random grid and angularly non-uniform
beam only)
Angular Dimensions of Beam radius OR
x half-angle & y half-angle
Orientation of beam set perpendicular to grid OR
direction vectors OR
Euler angles OR
Converge to a point OR
Diverge from a point

5.6 TracePro 2022 User’s Manual


Defining Sources

Table 5.3 lists the Wavelength data of a Grid Source. You can enter wavelengths
and weights, while flux and number of rays are determined by entries on the Grid
Setup tab.

TABLE 5.3. Grid Source Options - Wavelength

Wavelength tab

Attribute Value(s)
Wavelength Discrete wavelength(s) in m. Add wave-
lenths by typing the wavelength, and click-
ing Add or typing the Enter key. Delete
wavelength(s) by selecting them in the
table and clicking Delete.
Weight Relative weighting factor to be applied to
the flux for each wavelength.
Flux Flux to emitted for this wavelength, a cal-
culated value. For Total Flux or Total Irra-
diance sources, the flux for each
wavelength will be adjusted so that they
add up to the total flux as determined by
the Flux or Irradiance entry on the Grid
Setup tab.
#Rays Calculated, depending on choices on Grid
Setup tab. For Random grid pattern, the
number of rays for each wavelength will
adjusted so that the flux per ray for each
wavelength is approximately the same.

The Polarization tab provides a means to set the initial Polarization state of the
rays emitted from the Grid plane. The polarization options are listed in Table 5.4.

TABLE 5.4. Grid Source Options - Polarization Setup

Polarization tab
Standard Expert

Attribute Value(s)
Polarization state Unpolarized, linear, circular, or custom
Degree of Polarization 0 < degree <= 1
Custom Polarization Method, Handedness, Ratio, Orientation
Normalized Stokes Vector Display only

Once you have set the parameters, click the Trace This button and the raytrace
begins. See “Standard (Forward) Raytrace” on page 5.36

Setting Up the Grid


Grid Boundary
The grid boundary specifies the shape and dimensions of the boundary within
which a planar grid of rays is generated. Rays are generated according to the grid
pattern. Ray starting points that are outside the grid boundary are truncated, thus,

TracePro 2022 User’s Manual 5.7


Ray Tracing and Optimization

the total number of rays actually traced may not agree with the total number
provided in the dialog box. Grid patterns and boundaries can be mixed and
matched.

Shape
An annular grid boundary means that an annulus is defined with radii given by the
grid dimensions. All ray starting points are required to lie within the annulus.
For example, if a rectangular Grid Pattern is chosen with an annular grid
boundary, rays are started in a square grid with sides equal to the outer diameter
of the annulus. Points outside the annulus—in the hole of the annulus or in the
corners of the square—are eliminated.
If a rectangular grid boundary is used with a circular grid pattern, then the
diagonal dimension of the rectangular boundary is used as the diameter of the
circular grid. Points in the circle that lie outside the rectangle are truncated.
If an annular grid boundary is used with a circular grid pattern, rays in the hole of
the annulus are truncated.
If a random grid is chosen, points are randomly selected within the boundary
(either annular or rectangular).

Dimensions
• Outer Radius or Y Half-Height of Grid
Outer radius refers to the outer radius of the annular boundary. The y half-height
is the half-height of the rectangular grid boundary in the direction of the Up vector
or local y-axis of the grid.
• Inner Radius or X Half-Width of Grid
Inner radius refers to the inner radius of the annular boundary. Inner radius is the
half-width of the rectangular grid boundary in the local x direction of the grid.

Grid Pattern
Regular and dithered grids are defined by an array of cells. Once the grid pattern
is chosen, the area surrounded by the grid boundary is divided into an array of
cells, each with equal area. Then one ray is started from within each cell. For
circular, rectangular, and cross grids, each ray is started from the geometric
center of each cell. In a dithered rectangular grid, for each cell a point is chosen at
random within the cell, and a ray is started from that point.
For a random grid, the grid boundary is not subdivided and each ray is started
from a totally random location within the grid boundary.

Circular
In a circular grid pattern, rays are started in rings. The first ring is simply a point at
the center of the circle, and the second ring consists of six rays equally spaced
around a circle. Each successive ring has an additional six rays. The radii of the
rings are set so that each ray represents an equal area.
If you choose a number of rings equal to n, the number of rays N that are
generated is:

N = 3n n – 1 + 1 (5.1)

5.8 TracePro 2022 User’s Manual


Defining Sources

FIGURE 5.4 - Example of circular grid with 25 rings resulting in 1801 rays

Rectangular
In a rectangular grid pattern, rays start in a rectangular pattern, spaced in equal
increments along each of the local x and y-axes. To determine the starting points
for the rays, the boundary region is divided into rectangular cells.
For a rectangular boundary, the rectangle is divided into Nx x Ny cells, where Nx
and Ny are the number of points in the local or grid x and y directions, respectively.
The local x and y directions are determined by the Grid Orientation at the bottom
of the dialog box.
For an annular region, a square with side equal to the diameter of the outer circle
is used for the boundary region. Once the cells are determined, one ray is started
from the center of each cell. That results in a regularly spaced grid of rays.
The spacing of the ray starting points need not be the same in the x and y
directions. In other words, the cells for determining the ray starting points need not
be square, but are rectangular in general. The grid spacing (or cell aspect ratio) is
determined by the aspect ratio of the boundary and the values of Nx and Ny.

TracePro 2022 User’s Manual 5.9


Ray Tracing and Optimization

FIGURE 5.5 - Example of rectangular grid with Nx = 50 and Ny = 50 and a


square boundary, resulting in a square pattern with 2500 rays.

Dithered
Dithering is a process by which the rays in a rectangular grid are altered slightly to
introduce randomness in their starting positions—a compromise between a
rectangular grid and a random grid. Dithering breaks up pattern noise that occurs
with a rectangular grid while avoiding holes and clumps that occur in a random
grid.
The dithering is accomplished in TracePro by first defining a rectangular array of
cells as for the rectangular ray grid, then choosing a ray starting point randomly
within each cell.
The cells for determining the ray starting points for a dithered grid need not be
square, but are rectangular in general. The cell aspect ratio is determined by the
aspect ratio of the boundary and the values of Nx and Ny.

5.10 TracePro 2022 User’s Manual


Defining Sources

FIGURE 5.6 - Example of a dithered rectangular grid with Nx = 50 and Ny =


50 and a square boundary. Compare this with the figures for a
rectangular grid (Figure 5.5) and for a random grid (Figure 5.8).

Cross
The cross grid pattern lets you generate two lines of rays, one in the horizontal
direction, the other in the vertical direction. The number of rays in each direction is
always an odd number, so that there is always a ray at the center of the pattern. If
you enter an even number, one will be added to it to obtain an odd number before
the rays are generated. The ray starting points are determined by dividing the
boundary region into a grid of rectangular cells numbering Nx x Ny.
The cells for determining the ray starting points need not be square, but are
rectangular in general. The cell aspect ratio is determined by the aspect ratio of
the boundary and the values of Nx and Ny.

FIGURE 5.7 - Example of Cross grid with Nx = 50 and Ny = 50 resulting in a


pattern of 101 rays.

Random grid
In a random grid, points are selected randomly within the grid boundary. For a
rectangular boundary, points are selected at random within the rectangle, and for

TracePro 2022 User’s Manual 5.11


Ray Tracing and Optimization

an annular boundary, they are selected randomly within the annulus. Instead of
choosing the Nx and Ny values or a number of rings, you directly enter the total
number of rays to be traced.
A random grid is the purest form of Monte Carlo simulation, though it is not
necessarily the best. As can be seen in Figure 5.8, especially when contrasted
with the dithered random grid of Figure 5.6, the random distribution suffers from
voids and clumps in the ray distribution. This is bothersome if your model contains
a small design detail that needs a good sampling of rays (that is, not over- or
under-sampling)

FIGURE 5.8 - Example random grid pattern with 2500 rays and a square
boundary. Compare this with the figures for a rectangular grid and for a
dithered rectangular grid (above).

Checkerboard
This pattern includes major and minor increments for the ray positions within the
pattern. Between each major point additional rays will be traced for each set of
minor points. The new dialog is shown in Figure 5.9.

5.12 TracePro 2022 User’s Manual


Defining Sources

FIGURE 5.9 - Grid Source with checkerboard pattern

The output from the above ray grid is shown as an irradiance plot in Figure 5.10.

FIGURE 5.10 - Irradiance plot showing checkerboard grid pattern

TracePro 2022 User’s Manual 5.13


Ray Tracing and Optimization

Grid Density: Points/Rings


Number of Rings/Y Grid Points
This is the total number of grid points along the radius (i.e. the number of rings) for
a circular grid, or across the entire grid in the y direction for a rectangular or
dithered rectangular grid. Specifying one for this value in a rectangular grid
causes one row of rays to be generated. Specifying one for this value in a circular
grid causes one ray to be generated at the center of the grid.

Number of X Grid Points


This is the total number of grid points across the entire grid in the x direction for a
rectangular or dithered rectangular grid. Specifying one for this value causes one
column of rays to be generated in a rectangular grid.

Total rays
When the Grid Pattern is set to Random, enter the total number of rays to be
emitted for all wavelengths here. For other Grid Patterns, this is a calculated value
and cannot be changed.

Flux
You can select Flux per Ray, Total Flux, or Total Irradiance. The Flux per Ray is
the average flux per ray. It is a constant flux value for a uniform beam, and varies
for a non-uniform beam. For a uniform beam the ray flux of each starting ray is
equal to this number. For a non-uniform beam, each ray may have a different flux,
but the average flux for all rays is approximately equal to this number.
The Total Flux is the total flux, in the selected units, to be emitted over all
wavelengths. Thus the sum of the flux over all wavelengths will be equal to this
number.
The Total Irradiance is the total irradiance (illuminance), in the selected units, to
be emitted over all wavelengths. Thus the sum of the irradiance over all
wavelengths will be equal to this number.

Origin of Grid
These are simply the x, y, and z coordinates of the center of the grid in the
coordinate system of the model.

Orientation of Grid
The orientation of the grid is specified either by normal and up vectors or rotation
angles.

Normal and Up Vectors


The normal vector specifies the direction that is perpendicular to the imaginary
plane defining the grid. The up vector specifies the direction along which the local
y-axis points as well as the direction along which the y dimension of the grid
pattern and boundary are measured. You do not need to make the up vector
perpendicular to the normal vector, and the vectors do not need to be unit vectors.
For example, suppose you wish to emit rays from a plane at a 45 degree angle to

5.14 TracePro 2022 User’s Manual


Defining Sources

the y and z-axes, with the up direction lying in the y-z plane. You could do this by
entering, for example, the vectors shown in Table 5.5.
TABLE 5.5. Normal Vector with a 45 degree angle from both the y and z-axes.

Normal Vector Up Vector


X 0 X 0
Y 1 Y 1
Z 1 Z 0

TracePro normalizes the normal vector (0, 1/2, 1/2), then the up vector is
rotated to be perpendicular to the normal vector but still in the plane formed by the
original normal vector and up vector. After rotation, the up vector is (0, 1/2, -1/
2). For more details see “Normal and Up Vectors” on page 1.14.

Euler Angles
The Euler angles specify rotation angles about the coordinate axes for orienting
the grid. For rotation angles equal to zero, the grid has its normal in the global +z
direction, the y dimensions of the boundary and grid are along the y-axis, and the
x dimensions are along the x-axis. The three rotation angles allow you to modify
the orientation of the grid by successive rotations about the x, y, and z-axes.
You can choose to enter the angles in radians or degrees. To get a grid that is
oriented as in the previous example, you would enter an x Euler angle in degrees
of -45°, with y and z equal to zero. Rotations obey the right-hand rule.

Beam Setup
Spatial Profile of Beam
The spatial shape of the beam can be either uniform (flat-topped) or Gaussian. If a
Gaussian profile is chosen, you can enter the x and y waist radii of the beam to
make an elliptical beam. To make a Gaussian with circular symmetry, enter the
same number for both the x and y values. The x and y waist radii are the
distances from the peak of the beam to the 1/e2 value of the beam in each
direction. The orientation of the elliptical Gaussian is determined by the Grid
Position and Orientation values on the Grid Setup tab. The y value is measured
along the Up vector or the local y-axis of the grid, and the x value is measured
along the local x-axis of the grid, i.e. perpendicular to the local y-z plane.
If a Gaussian beam is chosen, it is truncated by the grid boundary. Also, TracePro
generates rays out to the edge of the boundary. If the grid boundary is much
larger than the 1/e2 values of the beam, most of the rays are generated with
absurdly low flux. If you do not wish this to happen, simply make the grid
boundary smaller.
If a Gaussian beam is chosen, then a random grid is always used.

Spatial Weighting of Beam


The spatial beam shape can be:
• Uniform flux & weighted position
• Uniform position & weighted flux

TracePro 2022 User’s Manual 5.15


Ray Tracing and Optimization

Uniform flux and weighted position — Each ray starts with a flux equal to the peak
flux, but the starting position of each ray is chosen by using the distribution
function. For a Gaussian beam, more rays will be started at the peak of the grid
than near the low-flux regions, with the aggregate flux profile being the chosen
functional distribution in shape.
Uniform position and weighted flux — The rays are distributed uniformly over the
grid dimensions, but the flux of each ray is weighted by the spatial distribution
function.

FIGURE 5.11 - Irradiance map for a circular Gaussian beam with uniform
position and weighted flux. The starting points of the rays are
distributed randomly, but the rays away from the peak have lower flux.

5.16 TracePro 2022 User’s Manual


Defining Sources

FIGURE 5.12 - Irradiance map for a circular Gaussian beam with uniform
flux and weighted position. The rays all start with the same flux, but
more rays are generated near the peak of the Gaussian.

Spatial Dimensions of Beam


These dimensions are meaningful only for a non-uniform spatial beam profile. For
a Gaussian spatial beam profile, the x and y radii define an elliptical Gaussian
beam, i.e.,

2 2
– 2  x  x0  – 2  y  y0 
E = E peak e , (5.2)

where x and y are the local or grid coordinate axes, E is the ray flux, Epeak is the
peak flux and x0 and y0 are the elliptical 1/e2 radii. The grid y-axis is defined by
the grid position/orientation Up Vector, and the grid z-axis is defined by the
Normal Vector. The grid x axis forms a right-handed coordinate system with the
other axes.

Spatial X Waist Radius of Beam

This is the radius to the 1/e2 value of the beam along the grid x-axis,

2
–2  x  x0 
E = E peak e , (5.3)

where x0 is the waist radius.

Spatial Y Waist Radius of Beam

This is the radius to the 1/e2 value of the beam along the grid y-axis,

TracePro 2022 User’s Manual 5.17


Ray Tracing and Optimization

2
–2  y  y0 
E = E peak e , (5.4)

where y0 is the waist radius.

Angular profile of beam


The angular profile of the beam can have a shape that is either uniform (i.e.,
forming a cone of rays), Gaussian, Lambertian or solar. The angular shape is
centered on the beam direction.
A uniform beam has uniform intensity within the cone angle defining the beam,
and zero outside it.
A Gaussian beam is Gaussian in profile, and the local x and y angles can be set
independently to create an elliptical angular shape for the beam.
A Lambertian beam has intensity equal to,

I = I 0 cos  , (5.5)

where  = 0 is along the grid normal. The beam is truncated at the angular radius
entered in the Half angle R entry.
A solar beam has angular profile equal to that measured for the sun. For this
selection, TracePro ignores the entries for angular size and uses the measured
angular size of the sun. The angular profile varies with the wavelength of light, so
TracePro uses the wavelength currently being traced as entered in the Raytrace
Options dialog box, Options tab. Data for the solar profile is taken from
Astrophysical Quantities, Second Edition, Chapter 9, by C.W. Allen, The Athlone
Press, London, ISBN: 0387987460 (1963).

Angular Weighting of Beam


This option is used only for nonuniform angular beam shape (i.e. Gaussian,
Lambertian, or solar). The beam can be either:
• Uniform flux & weighted angle
• Uniform angle & weighted flux
Uniform flux and weighted angle means each ray starts with a flux equal to the
peak flux, but the starting angle of each ray is chosen weighted by the angular
distribution function.
Uniform position and weighted flux means that rays are distributed uniformly, but
the flux of each ray is weighted by the angular distribution function.
For a Gaussian angular distribution, TracePro places an upper limit on the angular
spread to avoid generating rays that have very low flux. Rays are generated within
an elliptical cone such that the minium flux of rays generated within the cone is
10-20 of the peak value. Rays outside this elliptical cone, i.e. rays that would have
flux less than 10-20 of the peak value, are not generated.

Half Angle X & Y of Beam

For a Gaussian beam, this is the half angle to the 1/e2 value of the beam in the
local X or Y direction. The Gaussian beam has an angular profile given by

5.18 TracePro 2022 User’s Manual


Defining Sources

2 2
L = L peak cos e – 2  sin x  sin X  + 2  sin y  sin  Y  
, (5.6)

where X and Y are the half angles, x and y are angles from the beam direction in
the grid x and y directions, and  is defined by sin2 = sin2x + sin2y.

Half Angle R(adius)


Half Angle R is the half angle extent of the beam for Uniform and Lambertian
profiles.

Beam Orientation
The orientation of the beam can be set independently of the grid’s orientation or it
can be tied to the orientation of the grid. If set independently, it is specified by
either:
• A normal (direction) vector and up vector (in global coordinates)
• Rotation angles (in global coordinates).

Perpendicular to Grid
With this setting, the orientation of the beam is perpendicular to the plane of the
grid defined in the Grid Setup Tab.

Direction Vectors
The orientation of the beam is specified by two vectors. The normal vector points
down the middle of the beam, and the up vector specifies the up or local Y
direction of the beam, for Gaussian angular distributions. The default vectors are:
• Direction vector (0,0,1)
• Up vector (0,1,0)

Euler Angles
Euler rotation angles in global coordinates specify a normal vector parallel to the
beam and an up vector. The normal vector starts out as the Z unit vector and the
up vector as the Y unit vector. Then they are rotated by the angles specified, in the
order X, Y, and Z. For example, an x rotation rotates the nominal Z unit vector
about the x-axis. The resulting normal vector lies in the Y-Z plane.

Converge to/Diverge from Point


This mode defines a real point, Converge to, or a virtual point, Diverge from,
which is used to aim the rays as they exit the grid. This selection provides a
convenient way to define a point source, either real (Diverge from) or virtual
(Converge to).

Wavelengths
Use this tab to specify the discrete wavelengths to be traced for the Grid Source.
You can add a wavelength by typing the wavelength, in m, into the text box, and
clicking Add (or by pressing the Enter key). To delete wavelength(s), select them
in the table and click Delete.
The columns in the wavelength table are described in Table 5.3. You can enter a
relative weight for each wavelength in the Weight column, to tailor the source to

TracePro 2022 User’s Manual 5.19


Ray Tracing and Optimization

your needs. The entries in the Flux and # Rays columns are calculated based on
the settings in the Grid Setup tab and the weights.

Polarization Standard Expert

TracePro uses the Stokes vector-Mueller matrix representation of polarized light.


The Stokes vector represents the Polarization State of the light, and the Mueller
matrix represents how an optical device interacts with light. The interaction is
calculated by multiplying the Mueller matrix by the Stokes vector as a column
vector.
An advantage of using Stokes vectors over other methods is that unpolarized and
partially polarized light can be represented. A detailed discussion of polarized light
is beyond the scope of this manual, but such information can be found in many
textbooks. For example:
• E.L. O’Neill, Introduction to Statistical Optics, Dover (1992),
• E. Collett, Polarized Light, Dekker (1992),
• Shurcliff and Ballard, Polarized Light, van Nostrand (1964),
• Kliger, Lewis, and Randall, Polarized Light in Optics and Spectroscopy, Aca-
demic Press (1990)).
However, you can simulate polarized light in TracePro without knowing much
about Stokes vectors and Mueller matrices. A tabulation of Mueller matrices of
commonly used devices is given in the Technical Reference section. See
Table 7.4 on page 7.58.
The polarization tab of the Grid Source dialog box lets you specify the initial
Polarization State of rays emitted from the grid. The polarization tab has three
areas. In the top area you can choose the Polarization State and degree of
polarization. In the middle area you can enter the specifications for a custom
polarization state. The bottom part is for information only. The Polarization State is
depicted graphically and the calculated Stokes vector is also shown.

Polarization State
In order to fully specify the polarization state, you must enter:
• The polarization state, either a standard or custom one.
• The degree of polarization.
• The custom specifications, if you have chosen a custom polarization state.
• The orientation of the beam. This provides a reference direction or “Up Vector”
for the polarization state.
The orientation of the beam is determined by the settings in the Grid Setup tab
and the Beam Setup tab.
You can specify the Polarization State in one of three ways:
• Choose one of the standard polarization states.
• Specify a custom linear polarization state.
• Specify a custom elliptical polarization state.
Choose a standard polarization state by selecting from the drop-down list at the
top of the dialog box. The standard polarization states available are:
• Unpolarized

5.20 TracePro 2022 User’s Manual


Defining Sources

• Horizontal Linear
• Vertical Linear
• +45 degrees Linear
• -45 degrees Linear
• Right Circular
• Left Circular

Unpolarized light
Unpolarized light has no organized polarization state. It consists of a collection of
random polarization states. Unpolarized light is represented by the Stokes vector:

1
0
0
0
.
You can set the polarization state to unpolarized by either choosing Unpolarized
from the drop-down list, or by setting the degree of polarization equal to zero with
any of the polarized states.

Partially polarized light and the degree of polarization


If you specify the Polarization State, you also specify the degree of polarization.
Completely unpolarized light is specified by a degree of polarization equal to 0.
Fully polarized light has a degree of polarization equal to 1. Intermediate values
provide a mix of polarized light, unpolarized light, or partial polarization.

Custom Polarization

Custom linear polarization states


Selecting Custom Linear from the Polarization State dropdown list enables two
methods to set the orientation or rotation angle of the linear polarized state. By
selecting Ellipse and Handedness from the Method dropdown list, you set the
orientation of the linear polarization. For linear polarization, handedness has no
meaning and the ellipse ratio collapses to 0.0. By selecting Amplitudes and Phase
from the Method dropdown list, you can set the x and y amplitudes. For linear
polarization the phase difference is zero.

Custom elliptical polarization states


Selecting Custom Elliptical from the Polarization State drop-down list enables two
methods to set the polarization ellipse. By selecting Ellipse and Handedness from
the Method dropdown list, you can set the handedness, ratio and orientation of
the polarization ellipse. By selecting Amplitudes and Phase from the Method
dropdown list, you can set the X and Y amplitudes and phase difference of the
polarization ellipse. The labels on the entries change dynamically depending on
the method you choose for specifying the ellipse. The graphical display gives
helpful feedback on the polarization state you have specified.

TracePro 2022 User’s Manual 5.21


Ray Tracing and Optimization

Surface Sources
A surface source emits rays in a prescribed angular distribution from one or more
surfaces of a solid objects in the Model. Surface sources are defined as Surface
Properties and are described in Chapter 4. See “Surface Source Properties” on
page 4.12

Importance Sampling from Surface Sources Standard Expert

In order to increase sampling in a particular direction, you can use importance


sampling with surface sources. This is analogous to importance sampling for
scattered rays. The importance sampling setup that you enter for scattered light is
also used for surface sources.
With importance sampling specified for a surface that is a source, emitted rays will
be generated in a direction as specified by the importance sampling data. The flux
of the rays is determined by the angular emission profile of the source, the solid
angle subtended by the importance sampling target, and the flux or irradiance of
the surface source. See “Importance Sampling” on page 4.20

File Sources
A ray file can be inserted into a TracePro model and used as a source. A ray file
consists of 7 columns of tabular data, XYZ starting positions for each ray, XYZ
direction vectors for each ray, and a flux.
The File Source concept provides the capability to:
1. incorporate measured source distribution data from opsira,r Radiant Zemax, or
other source measurement device into a TracePro model,
2. “continue” a raytrace by using data incident on one surface to be used as a
source in another raytrace or another model, and
3. create a source from either theoretical or measured data in another application
(e.g. - text editor or spreadsheet).
No matter which method was used to create the ray file, the File Source is
inserted into the model the same way.

Creating a Ray File from Radiant Zemax Data


Radiant Zemax, Inc. (Duvall, Washington, USA) provides measurement services
and data for light sources. Lambda Research collaborates with Radiant Zemax to
let you import measurement data and use it within TracePro to simulate real light
sources.
To create a TracePro File Source using Radiant Imaging data, perform the
following steps:
1. Start ProSource, available from Radiant Imaging.
1. Open a Radiant Zemax database file.
2. Enter output options in the Ray Generation dialog.
3. Select the TracePro output type and file name with a *.dat or *.txt extension.
4. Press Generate Rays to create the TracePro ray file.
For more information on ProSource, contact Radiant Zemax, 
http://www.radiantzemax.com/.

5.22 TracePro 2022 User’s Manual


Defining Sources

Creating a Ray File from an Incident Ray Table


A Ray File can be created from an Incident Ray Table in TracePro. Some
examples of how this capability can be used are as follows:
• model an LED, insert a dummy object as a “target”, perform a raytrace, save
the Incident Ray Table as a ray file, insert the ray file of the LED into other
models. The ray file for the LED can be repeatedly inserted into several loca-
tions in the same model to create an LED array
• for performing a Stray Light Analysis on a complex optical system, a dummy
object can be inserted as a “target” at any point along the optical path - the
Incident Rays on the “target” can be saved as a ray file, and the ray file can be
inserted into the model to be used as a source while analyzing/modifying the
objects at the end of the optical path - the raytrace times can be decreased
considerably when the first group of objects are omitted from the raytrace
To create the ray file:
1. select the surface in the Model Window or the System Tree
2. select Analysis|Incident Ray Table to view the Incident Ray Table
3. with the Incident Ray table as the active window, select File|Save As, choose
the file format as *.txt, and check the box for “Export to Ray File format”
The ray file saved from the Incident Ray Table will always be saved as
Radiometric units. If TracePro is set to Photometric units, the data will be
converted to Radiometric units when it is saved as a ray file.
For more information on Incident Ray Tables see the section titled “Incident Ray
Table” on page 6.49.

Creating a Ray File from Theoretical or Measured Data


A ray file must have the appropriate header information to be recognized by
TracePro. (See the TracePro Help topic “Ray File Format” for further information)
The easiest way to create a file with the proper format and header information is
to make a simple TracePro model and follow the steps above to create a ray file
from an Incident Ray Table. Next, open the newly created ray file in a text editor or
a spreadsheet application. Delete the existing data, then Calculate, cut-and-paste,
or input the theoretical or measured data for the source. Save the file as a text file.

Insert Source
To use the ray file in a TracePro model, select Define|File Source to open the
File Source dialog box as shown in Figure 5.13. You can also open the dialog from
the Source tab in the System Tree by Right-Clicking and selecting Define|File
Source.

When the File Source dialog is opened you can create a new file source by doing
the following:

TracePro 2022 User’s Manual 5.23


Ray Tracing and Optimization

FIGURE 5.13 - File Source dialog box.

1. Enter a name to identify the source.


2. Enter the name of a txt, dat, src or ray file by either typing it into the cell or by
browsing to it using the browse button on the File Source dialog box.
3. Enter the Center Position of the source.
4. Enter the Rotation angles.
5. Enter a value for Trace % of rays.
6. Enter a scale factor for the flux.
7. Select the units for the source. Do not change this setting from Radiometric in
most circumstances. All TracePro ray files are in Radiometric units. If you have
a ray file that was incorrectly generated and has Photometric units, i.e. ray
fluxes in lumens instead of watts, this setting allows you specify that the flux
values in the file are lumens instead of watts.
8. Select a color.
9. Click Insert to insert the source into your model.
If the source contains wavelengths, they will be displayed, along with the total flux
for the wavelength and a weight of 1. You can enter weight values to change the
spectral balance of the source. If the source contains no wavelengths, you must
enter your own by typing in a wavelength (in m) and clicking Add (or pressing

5.24 TracePro 2022 User’s Manual


Defining Sources

Enter). You can delete wavelengths by selecting them in the table and clicking
Delete.
Note: By selecting the Center Position as the origin (0, 0, 0), and the Rotation
Angles as 0, the rays will be emitted from the XYZ location specified in the ray file,
and will propagate in the direction of the XYZ direction vectors specified in the ray
file. Selection of any other Center Position or Rotation Angle will effectively “add
an offset” to the positions and/or direction vectors specified in the ray file.
You can change to radians by clicking the in Degrees button, which toggles
between radians and degrees. Selecting the button changes the name on the
button to in Radians. You can change back to degrees by clicking the button
again.
To modify an existing source, first select it in the Source Tree and select
Define|File Source (or simply double-click on the name of the source in the
Source Tree). Change entries as desired and click Modify to modify the source.

Capability to trace % of rays


TracePro allows you to trace a subset of the rays in a ray file using the “Trace % of
rays” field. This is useful for tracing a relatively small number of rays from a large
ray file to make sure your model is set up correctly. When the value is set to less
than 100%, you can get a different subset of rays by changing the Random Seed
in Raytrace|Raytrace Options|Options. Entering a value less than 100 will
reduce the total flux of the source by an unknown amount, because each ray in
the ray file has a unique flux value assigned to it.

Capability to scale flux


The total flux in the ray file can be scaled using the “Scale flux” field in the File
Source dialog. The total flux of the source is displayed in the File Source dialog to
facilitate this data entry. For a ray file emitting 5W, entering “1.05” for “Scale Flux”
will increase the flux of each ray such that the Total Flux emitted will now be
5.25W.

Modify the File Source


Changing Source Location and Orientation
To move and rotate the source, you can either use the Move Source and Rotate
Source options or open the File Source dialog either from the Source tab in the
System Tree or by using Define|File Source. For the latter method, select the
source to change and update the values. For the former method see “” on
page 5.30. When a File Source is selected in the Source tab in the System Tree, a
sphere is drawn in the Model window showing the location source’s center and
maximum radius of the rays’ starting points from the center. The sphere is drawn
in the color selected in the File Source dialog.

Changing File Source Data


Ray files may be downloaded from a source manufacturer’s web site, generated
by using the opsira luca’rayset software, the ProSource® software, the Bitmap
Source Utility - Utilities|Bitmap Source, by saving an Incident Ray Table as a
ray file, or by hand using a text editor or spreadsheet program. Both ASCII and
Binary formats are supported. For more detailed information on the ray file

TracePro 2022 User’s Manual 5.25


Ray Tracing and Optimization

formats, please refer to the TracePro on-line help: Contents(tab)|Define


Commands|File Source|Ray File Format.

You may want to modify data within a ray file, but that file is used in multiple
TracePro models. The next time one of those models is opened and a raytrace is
performed, you might be surprised to obtain a different analysis result, not
realizing that the ray file had been modified. TracePro warns of this condition.
When the TracePro file is saved, the last modified date of any ray files are stored
as part of the oml file. The next time that TracePro file is opened, TracePro checks
to see if any of the ray files now have a later date than the date that was stored. If
this occurs, the following warning message is displayed:

FIGURE 5.14 - Warning of Ray File Modification

Please note that this check is not performed before each raytrace. If the TracePro
oml file remains open, the ray file can be modified, and the “modified” rays can be
traced without warning.

Image Sources
This feature enables you to insert a standard RGB image file into a TracePro
model and use it as a source of light. The Image Source dialog box shown in
Figure 5.15 allows you to choose an image file, then select the emission from it in
either radiometric or photometric units.

5.26 TracePro 2022 User’s Manual


Defining Sources

FIGURE 5.15 - Image Source dialog box

Each of the red, green and blue pixel values emit light at three wavelengths you
assign, one for each color. You also enter the size, position, and orientation of the
source. To create an Image Source, you need to specify:
• Name of the source
• Path to the image file (bmp, jpg, png, gif, or tif)
• Image width and height in pixels (for information only, this is read from the file)
• Emission type (Irradiance/Illuminance or Radiance/Luminance)
• Units: radiometric or photometric
• Angular distribution: Lambertian, Uniform, or Gaussian
• Rays to emit: all, random only, or importance sampled only
• Peak value of the emission type – emission value of a pure white pixel, i.e.
RGB = (255,255,255)
• Half angle of the emitted distribution

TracePro 2022 User’s Manual 5.27


Ray Tracing and Optimization

• Max rays per pixel – a pure white pixel will emit this many rays for each color.
• Source dimensions: the width and of the source in model units.
• Source Position and Orientation
• Wavelengths and weights – an image source must have three wavelength
•The first wavelength is used for emitting blue pixel values
•The second wavelength is used for emitting green pixel values
•The third wavelength is used for emitting red pixel values
•To change a wavelength, Add a new wavelength and Delete an existing
wavelength
After you have entered all the data, click Insert, and TracePro will do the following:
• Create a rectangular Thin Sheet according to the values specified by Source
Dimensions and Source Position and Orientation.
• Display the image file superimposed on the thin sheet.
• Attach the Image Source data to the thin sheet.

When creating an image source, beware that the number of rays emitted is
proportional to the number of pixels, as specified by the Max Rays/pixel entry.
Therefore large, high-resolution images will generate many rays and take a long
time to complete the raytrace.
Figure 5.16 shows a color test image created in a TracePro model, and Figure
5.17 shows a Photorealistic Render of the color test image.

5.28 TracePro 2022 User’s Manual


Defining Sources

FIGURE 5.16 - Color test image inserted into a TracePro model and
displayed on the resulting thin sheet

TracePro 2022 User’s Manual 5.29


Ray Tracing and Optimization

FIGURE 5.17 - Photorealistic rendering of color test image

Ray File Wavelength Editor


This command opens a ray file, either binary or text, and allows you to edit the
wavelengths in the file.
To select a ray file source to modify it, first select Define|Ray File Wavelength
Editor. In the dialog box, type in the name of the path of the file you wish to edit,
or browse to the file by clicking the [...] button. Once the file is open, the
wavelengths will be displayed. To change one or more wavelengths, you can
simply type in a new wavelength, or scale the wavelengths using the Scale factor
value. Finally, click Save As to save the modified file.

5.30 TracePro 2022 User’s Manual


Defining Sources

FIGURE 5.18 - Ray File Wavelength Editor

Ray File The path to the Ray File. Browse to the file using the
browse button.
Wavelength A list of wavelengths in the ray file.
New Wavelength A list of wavelengths that will replace the wave-
lengths in the ray file.
Edit Wavelengths This selection allows you to directly type in new
wavelengths.
Scale Wavelengths Applies a scaling factor to each wavelength in the
file.
Scale factor Factor by which the wavelengths in the file will be
scaled.
Save As Save the file with the new wavelengths.

Source Builder
The Source Builder helps you create different types of sources using different
source "wizards":
• Convert LED specifications to a Surface SourceProperty.
• Convert an IES source photometric file to a Surface Source Property.
• Convert an image to a File Source (rays launched at pupil).

TracePro 2022 User’s Manual 5.31


Ray Tracing and Optimization

• Convert LightTools® ray file to TracePro ray file.


You can also use the Source Builder to manually create sources.
To open the Source Builder, select Define|Source Builder.
The Source Builder has its own help system.

FIGURE 5.19 - Source Builder

Orienting and Selecting Sources


You can select, move, and rotate sources. Multi-select gives you the option to
select multiple surface, grid, and file sources to accomplish actions for the
selected sources. The ability to move and rotate grid and file sources through the
Source Tree tab interface, especially in light of the multi-select source capability,
gives you the ability to be more efficient and less prone to user-input error during
development of your system. An example to illustrate the utility is provided in
“Anisotropic Surface Property” on page 9.41.

Multi-Selecting Sources
You can select multiple sources, file, grid, and surface, by left clicking a given
source while holding the Ctrl or Shift key. The following actions occur while
holding down one of the keys:
• Shift: Selects a list of sources, up or down, from the currently selected one to
the one on which you have clicked

5.32 TracePro 2022 User’s Manual


Defining Sources

• Ctrl: Selects the clicked source adding it to a list of sources. The final selected
list does not need to be contiguous.
You can use the Shift and Ctrl keys in conjunction to each other to select
contiguous and distinct sources. The Shift and Ctrl key left-click operations are
standard Windows operations. These actions also work in many other TracePro
windows, including the Model Tree tab.
By right-clicking on one of the selected sources, you get a pop-up menu with
many options to Move or Rotate Source for Surfaces Sources (Figure 5.20).

FIGURE 5.20 - Right-click pop-up menu in Source Tree

Move and Rotate Dialogs


With one or more Grid or File Sources selected, you can Move Source or Rotate
Source. To move or rotate a Surface Source you must use the Move or Rotate
option in the Model Tree for moving or rotating the object that contains the Surface
Source. Figure 5.21 shows the dialog for Move Source, while Figure 5.22 shows
the dialog for Rotate Source.

TracePro 2022 User’s Manual 5.33


Ray Tracing and Optimization

FIGURE 5.21 - Move Source dialog.

FIGURE 5.22 - Rotate Source dialog.

Sources Editor
A Spreadsheet style editor is available to view and modify sources. This editor
provides an interface to modify individual sources and allows setting and scaling
source data for multiple sources. Open the editor using the Define|Source
Editor menu selection. The list selection at the top allows you to modify Surface,
File, or Grid sources.

FIGURE 5.23 - Sources Editor

5.34 TracePro 2022 User’s Manual


Defining Sources

Within the editor, changes are made to the numeric values by typing new data in
the appropriate cell. For the Surface Source selection, Source Type, Units, and
Distribution data cells provide lists of options to select from. Several sources may
be modified by selecting cells and pressing the Modify Selection button. An
example of multiple source editing follows in the next section.

Scaling the Total Rays for Several Sources


To modify several sources simultaneously:
1. Select one or more source parameters as shown in Figure 5.24. In this
example the selection includes the Total Rays for all defined sources.
2. Press Modify Selection to display the Modify Selected Source Parameter
dialog which provides an entry for a new parameter value or scale factor. See
Figure 5.24.
3. Press Scale to apply a scale factor the selected values, or Set To to change
the values to a new value.

FIGURE 5.24 - Sources Editor Modify Dialog box

When Selecting parameter cells, the <Shift> and <Ctrl> keys allow extending the
selection in the usual ways. Selections may be made across rows and columns as
shown in Figure 5.25.

FIGURE 5.25 - Extended selection in numeric data cells

The source Type, Units, and Distribution are altered using a drop down list by
pressing the list arrow as shown in Figure 5.26.

TracePro 2022 User’s Manual 5.35


Ray Tracing and Optimization

FIGURE 5.26 - Source Type dropdown list

Tracing Rays
Raytracing is the fundamental tool for performing simulations in TracePro. This
next section covers the three types of raytracing, Standard, Reverse and
Luminance/Radiance.

Standard (Forward) Raytrace


Standard or Forward raytracing is the normal method used to simulate the flux
propagation in a TracePro model. Rays will emanate from all of the sources
defined in the model as described above. Initiating the raytrace is done by
selecting Raytrace|Trace Rays or pressing the Trace Rays button on the
toolbar.
Most sources are defined as using “discrete wavelengths”. Surface sources
defined as Blackbody or Graybody sources will use “calculated wavelengths.”
Surface Sources that use a Surface Source Property may use either discrete
wavelengths or calculated wavelengths.
The raytrace begins when Raytrace|Trace Rays is selected, or the toobar
button is clicked. First, a dialog box will open, asking which ray-tracing mode you
wish, either Analysis Mode or Simulation Mode. For a discussion of which mode
to use in what circumstances, see “Ray Tracing modes” on page 5.54. During the
raytrace a progress dialog box opens to indicate progress of the raytrace. You can
interrupt or pause the raytrace at any time by clicking Cancel on the Raytrace
Progress dialog box and TracePro will finish tracing the current ray. You can
resume the raytrace by selecting Raytrace|Resume Raytrace. The raytrace
resumes starting at the next consecutive ray number in the raytrace.

Reverse Ray Tracing Standard Expert

TracePro has the capability to perform reverse ray tracing. Tracing rays in reverse
is useful in situations where importance sampling in the forward direction is
difficult or impossible. This is true, for example, in the design of a reflector coupled
to a source for which only a few points in the output plane need to be sampled,
such as for a low-beam head lamp above the horizon. Note that when source(s)
are listed below, it refers to surface sources. Reverse ray tracing does not apply
to grid and file sources.

5.36 TracePro 2022 User’s Manual


Tracing Rays

Specifying reverse rays


In summary, to do a reverse ray trace you must perform the following steps:
1. Set up the model with surface source(s) and exit surface(s) as usual.
2. Define importance sampling to be used by the exit surface(s) during the
Reverse Raytrace. This is done using the existing Importance Sampling tab in
the Apply Properties dialog box.
3. Define the number of reverse rays to trace for each exit surface. This number
is entered in the Exit Surface tab of the Apply Properties dialog box.
4. Select Raytrace|Reverse Raytrace to start the ray trace.
5. The process of analysis is the same as if a forward ray trace has been
performed. By selecting one of the exit surfaces you can display the Irradiance
or Illuminance Map for this surface. In other words it is as if the rays had been
traced in the forward direction. The irradiance/illuminance from all surface
sources is displayed on the selected surface.
6. To display sorted rays, select the surface of interest - usually an exit surface -
and the rays at that surface will be displayed as though the rays were traced
forward.
7. The Incident Ray Table and the Ray History Table are displayed in the same
way as for forward rays.
8. The only options available for Candela plots are rays exiting a surface and
rays incident on a surface. The “missed rays” option is not available for
Candela plots with reverse ray tracing.
Note: If there is no importance sampling specified for an exit surface, no rays will
be emitted from that exit surface.
Note: Reverse ray tracing does not apply to grid and file sources - only surface
sources are used.

Theory of reverse ray tracing


Reverse ray tracing allows efficient sampling of rays in illumination design when
only a few local points on the output plane need to be sampled. By tracing rays in
reverse from the output plane and importance sampling toward a reflector, only a
few rays need to be traced to get good sampling for the purposes of design.
Designing in this manner consists of choosing a few representative points on the
output plane, and tracing rays toward importance sampling targets. Rays are
“absorbed” by the surface source in proportion to the radiance/luminance of the
source at that direction and position. The absorbed flux is referred back to the
point on the output plane where the ray started.
Specifically, in forward ray tracing, the flux of the emitted ray is

L s dA s d s
d s = -----------------------
-, (5.1)
N
where Ls is the source radiance, dAs is an element of projected area on the
source surface, ds is an element of solid angle, and N is the number of rays
emitted from the surface element into the solid angle. When the forward ray
reaches the output plane, the resulting irradiance is

TracePro 2022 User’s Manual 5.37


Ray Tracing and Optimization

d s
dE o = --------- , (5.2)
dA o
where dAo is an element of area on the output plane.
In reverse ray tracing, the “flux” of the ray emitted from the output plane is
unknown, only the A product, étendue, of the ray is known. If the ray hits the
source, the flux of the ray at the output plane can be computed as

Ls Ao o 
 o = --------------------- , (5.3)
N
where o is the solid angle of the ray as it is “emitted” from the output plane, i.e.
the solid angle subtended by the importance sampling target, and  is the
“transmittance” experienced by the ray along its path from the output plane to the
source. Rays missing the source are not “seen” at the exit surface since the path
would not have come from the source. For example, if a ray is emitted from an exit
surface, reflects from a reflector with reflectance of 0.9 and passes through two
glass surfaces each with transmittance 0.96 before striking a source surface, then
the ray’s transmittance is 0.9 x 0.96 x 0.96 = 0.829.

Luminance/Radiance Ray Tracing


Luminance and Radiance Maps will be covered here as the third ray trace method
since they are so closely linked to the ray trace. The options associated with the
view of the data is covered in Chapter 6. See “Luminance/Radiance Maps” on
page 6.18
You can obtain a Luminance or Radiance Map or rendered image (Photorealistic
Rendering) of a TracePro model that is illuminated by the actual surface and/or
file sources and uses the surface and material properties in the model. You can
generate as many maps/renderings of a model as you like by defining a name for
each one. Luminance/Radiance maps work with surface and file sources, not with
grid sources.
Note: The wording of the Luminance/Radiance tab in the System Tree window is
automatically set to either Luminance or Radiance by TracePro depending on
analysis units of the model (see page 5.43). For convenience, Luminance,

5.38 TracePro 2022 User’s Manual


Tracing Rays

Radiance and Photorealistic Rendering will be referred to as Luminance for the


remainder of this section.

FIGURE 5.27 - Luminance Tab in the System Tree with Luminance defined
map displayed in the Model Window.

The plots are defined either from the Luminance tab in the System Tree by right
clicking in the window or from the Define|Luminance/Radiance menu item. The
Luminance tab is used to display all of the defined plots and to edit or add
additional plots to the model, or to delete plots. The Luminance tab is shown in
Figure 5.27.
Remember that the title of the dialog box will be Radiance if radiometric units are
selected, or Luminance if photometric units are selected. You can choose the
units by selecting Raytrace|Raytrace Options. The Options tab contains the
selection for radiometric/photometric analysis units.

TracePro 2022 User’s Manual 5.39


Ray Tracing and Optimization

FIGURE 5.28 - Luminance dialog box.

The rendering is accomplished by tracing rays in reverse. See “Theory of reverse


ray tracing” on page 5.37. To set up a luminance map, specify the eye position
and the target position and ray tracing parameters by the following steps:
1. Open a model for which you wish to generate a map or rendering.
2. Orient the view using the View menu commands to an orientation from which
you would like to generate the map/rendering.
3. Select Define|Luminance/Radiance from the TracePro main menu to open
the Luminance/Radiance dialog box as shown in Figure 5.28.
4. Enter a name in the dialog box.
5. To import the eye position, target position, up vector, width and height from the
current view of the Model Window, click the Model View button. Otherwise,
enter the eye position, target position, up vector, width and height you wish to
use.
a. The eye position is a Cartesian (x,y,z) point in space representing the
point of view from which the scene will be generate, and can be
thought of as a camera position.
b. The target position is a Cartesian (x,y,z) point in space representing
the center of the rendering/map that will be generated and can be
thought of as the position towards which the camera is pointing.
c. The up vector defines what direction is up in the rendering/map.

5.40 TracePro 2022 User’s Manual


Raytrace Options

d. Width represents the horizontal width of the map in system units.


e. Height represents vertical height of the map in system units.
6. Set the number of pixels in the horizontal or vertical direction. When you set
one value, the other is automatically computed from the aspect ratio as
determined by the height and width values.
7. Choose the picture quality. This determines the number of rays that will be
traced. You can choose Low, High, or Custom.
8. Click on the checkbox Auto importance sampling toward sources in order to
improve the sampling since the number of useful rays traced in reverse to the
sources will be higher. Using Auto importance sampling will reduce the noise
in the resulting map or rendering when there are scattering surfaces in the
model. You will need to lower the flux threshold, when using importance
sampling, just as you need to for forward ray tracing. You can also manually
apply importance targets in addition to or instead of using Auto importance
sampling, but remember that rays are being traced in reverse, and define your
targets accordingly. An example is provided in “Example Using Luminance/
Radiance Maps” on page 9.65.
9. Once you have the settings the way you wish, click the Insert button to create
the Radiance/Luminance map. TracePro will draw a wireframe representation
of the settings on top of the geometry whenever the Radiance source is
selected.
10.Once you are ready to do the analysis, select Raytrace|Trace Luminance/
Radiance. TracePro will begin the ray trace using the wavelengths defined for
each surface source. A Progress dialog box will open and display the %
complete, elapsed time, and estimated time remaining.
11. When the ray trace is complete, click the Display map button to display the
map/rendering.
To modify an existing Luminance/Radiance setup, simply double-click on its name
in the Radiance/Luminance tab in the System tree, or select Define|Luminance/
Radiance and select the Luminance/Radiance map in the tree. Then change any
values as needed and click Modify.
Chapter 6 will cover what is displayed for a Luminance map and the options to
modify the map format. See “Luminance/Radiance Maps” on page 6.18

Raytrace Options
The Raytrace Options dialog box is opened by selecting Raytrace|Raytrace
Options, as is shown in Figure 5.29. Note this depiction is only for the Standard
and Expert editions of TracePro. This dialog controls various aspects of the
raytrace.

TracePro 2022 User’s Manual 5.41


Ray Tracing and Optimization

FIGURE 5.29 - Raytrace Options Dialog for Standard and Expert editions of
TracePro

The Raytrace Options are saved when the Model is written to disk in an OML file.
After the data is changed, pressing the Set Defaults button stores the data into the
TracePro defaults files to be used the next time TracePro is opened. See “User
Defaults” on page 1.11
LC See “Simulation Options for TracePro LC” on page 5.48 to view the Options
Dialog for the LC edition of TracePro.

Options
The Options tab of the Raytrace|Raytrace Options dialog box allows you to set
parameters that affect how the raytrace is done. They affect the entire model.
• You can select whether importance sampling is done during the raytrace by
checking the Importance Sampling check box.
• The Random Rays box allows you to set how many randomly scattered and/or
diffracted rays are generated whenever a ray strikes a scattering or diffracting
surface.
• Finally, you can set the random number seed and radiometric units.

5.42 TracePro 2022 User’s Manual


Raytrace Options

Analysis Units
The Analysis Units entry lets you choose between radiometric units or photometric
units. The radiometric and photometric units used in TracePro are SI units. The
units have the meanings summarized in Table 5.6.
TABLE 5.6. The Choice of Radiometry and Photometry Units

Radiometry Photometry

Name Unit Name Unit


Power Flux Watt (W) Luminous flux lumen (l)
Power/area Irradiance* Watt/meter 2 Illuminance lux (lx)
(W/m2)
Power/solid Radiant Inten- Watt/steradian Luminous candela (cd)
angle sity (W/sr) intensity

*The Irradiance is on an illuminated surface. The Radiant Exitance is what is


emitted (from a source or scattered from an illuminated surface). For the latter, the
exitance is (1-a)*E, where a is the absorption and E is the irradiance.
The choice of radiometric or photometric units affects the display of units
throughout TracePro. Units are displayed in TracePro as indicated in Table 5.7.
TABLE 5.7. Effect of the choice of Units in TracePro

Place Radiometric label(s) Photometric label(s)


Irradiance/Illuminance Total - Irradiance Map Total – Illuminance Map
map – top
Irradiance/Illuminance Unit = W/m2 Unit = lux
map – units
Irradiance/Illuminance Unit = W Unit = lumen
map – flux
Irradiance/Illuminance Irradiance Illuminance
map options - Map Type

Intensity/Candela plot Intensity - W/sr Luminous Intensity - candela


Luminance/Radiance map Radiance - W/m -sr 2
Luminance - cd/m2(nit),
footlambert, or millilambert

Ray Splitting
Placing a check mark in the Ray Splitting check box lets you apply selections for
Specular Rays Only, Importance Sampling, Polarization, and Aperture Diffraction
to your raytrace.
In “crude” Monte Carlo ray tracing, there is no ray splitting or importance
sampling. Each time a ray strikes a surface, the absorption, reflection, and
transmission coefficients of the surface are used as probabilities, and one ray
component is chosen randomly, weighted by these coefficients. For example,
suppose a surface has absorptance equal to 0.1, reflectance equal to 0.2, and
transmittance equal to 0.7 (these coefficients must sum to one to satisfy the
principle of conservation of energy). When rays strike the surface, 10% of the time
they are completely absorbed, 20% of the time they are completely reflected, and

TracePro 2022 User’s Manual 5.43


Ray Tracing and Optimization

70% of the time they are completely transmitted. That result is achieved by the
following method: when a ray strikes the surface, a random number is chosen
between zero and one. If the number is between 0 and 0.1, the ray is absorbed. If
the number is between 0.1 and 0.3, the ray is reflected, and if the number is
between 0.3 and 1.0, the ray is transmitted. The fraction of incident flux reaching
the exit surface of the model is determined by simply counting up the number of
rays that are absorbed by it and dividing by the number of rays started in the
simulation.
If you enable ray splitting, when a ray intersects a surface, several split ray
components are generated. The flux from the ray at the intersection is split
between the ray components according the their absorption, reflection, and
transmission coefficients. Since the number of split rays grows geometrically, a
large number of ray segments is created causing TracePro to use a large amount
of computer memory. It is important for you to know that If you have a non-imaging
system model in which surfaces reflect and transmit light almost equally, you can
turn off ray splitting.
In a system model, many split rays are terminated when their flux falls below the
flux threshold, keeping the number of ray components to a manageable number. If
the use of ray splitting causes the raytrace to proceed slowly, check to be sure
that the flux thresholds are not set too low. If the raytrace is slow even with
appropriately set flux thresholds, try turning off ray splitting.
At coincident surfaces between two objects, TracePro follows a detailed method
for determining the reflectance, transmittance, and absorptance for the rays. See
“Coincident Surfaces” on page 7.15 for a complete discussion of this method.

No ray splitting in RepTile


When a ray enters a Reptile Cell, ray splitting is temporarily turned off. When a ray
leaves the RepTile cell, Ray Splitting returns to its former setting.

Specular Rays Only Standard Expert

Checking the check box for Specular Rays Only limits the rays to be traced to
those segments using specular reflection and transmission. You can use this
control to turn off tracing of scattered rays. This is useful for debugging your data
or for doing specialized analyses such as ghost image analysis. Any flux that
would normally be given to scattered rays is lost, in these cases Conservation of
Energy is not ensured.

Importance Sampling Standard Expert

If the Importance Sampling check box contains a check mark, the importance
sampling that you have specified is performed during a raytrace. Unchecking the
box turns off importance sampling. If you are debugging your model and do not
want importance sampled rays to be generated, turning off importance sampling is
useful. If importance sampling is turned off, flux that might have been allocated to
importance sampled rays is given to random rays.

Aperture Diffraction
Standard Expert

Checking the Aperture Diffraction check box causes TracePro to bend rays that
pass close to a diffracting edge. Unchecking the check box causes any diffracting

5.44 TracePro 2022 User’s Manual


Raytrace Options

surfaces to be treated as normal surfaces. For a discussion of setting up


diffraction in TracePro, see “Defining Diffraction in TracePro” on page 4.32.

Random Rays
The Random Rays number specifies how many randomly scattered rays are
generated when a ray strikes a surface with diffraction or with a surface property
that has scattering. Random rays are those that are scattered in random
directions, weighted by the BSDF.
The default value is 1. You can specify any positive number. A large number can
cause the ray tree to be very wide, causing the raytrace to proceed slowly and too
much memory to be consumed.

Fluorescence Expert

When a model includes Fluorescent properties (See “Fluorescence Properties” on


page 4.7 and page 3.12), the effects of fluorescence emission is enabled by
setting Fluorescence on in the Raytrace Options dialog. The emission wavebands
need to be defined in the Wavelengths tab defined below. See “Fluorescence
Properties” on page 3.12
After the initial excitation rays are traced you have the option to:
• stop the raytrace and not trace the emission rays (option: Generate emission
source only)
• continue the raytrace and include the emission rays (option: Immediately trace
emission wavelengths).
During the raytrace, fluorescent objects or bodies will emit rays simulating
fluorescence emission. These rays are stored in File Sources to be used during
the emission part of the raytrace. The Insert file source option is used to
automatically include the file source(s) into the model. If Insert file source is left
unchecked, the model will remain in its “pre-raytrace” state.

Polarization Standard Expert

Checking this box turns on the polarization ray tracing features of TracePro. A
Stokes vector will be attached to each ray, and the Stokes vector may be modified
when it interacts with a polarizing surface property, when passing through an
object that has a Mueller matrix applied to it, or when passing though a
birefringent material. You might notice a slowing of the raytrace and more
consumption of memory when polarization is enabled.
Discussions and examples of Mueller matrices and Stokes vectors can be found
in the Technical Reference section, “Mueller Matrices and Stokes Vectors” on
page 7.57 and many textbooks including:
• E.L. O’Neill, Introduction to Statistical Optics, Dover (1992),
• E. Collett, Polarized Light, Dekker (1992),
• Shurcliff and Ballard, Polarized Light, van Nostrand (1964),
• Kliger, Lewis, and Randall, Polarized Light in Optics and Spectroscopy, Aca-
demic Press (1990)).

TracePro 2022 User’s Manual 5.45


Ray Tracing and Optimization

Detect Ray Starting in Bodies


There are occasions when using TracePro where rays are emitted from within an
object or multiple layers of embedded objects. Checking Detect Ray Starting in
Bodies will cause TracePro to correctly determine the properties associated with
the starting point of a ray. Leaving this box unchecked will allow a faster raytrace.

Random Seed
TracePro uses pseudorandom numbers for a variety of tasks, for example, for
setting the directions of scattered rays or the starting locations for a random grid
or surface source. Whenever a random number is needed, a random number
generator is used to obtain the random number. The random number generator
requires a seed, or initial value, to get it started generating a sequence of
pseudorandom numbers. If the seed is the same for two successive simulations,
the same sequence of random numbers is generated. Because such a sequence
can be an advantage or a drawback, TracePro lets you set that seed value. Most
users never need to change this value.

Thresholds
The Thresholds tab of the Raytrace Options dialog box, as shown in Figure 5.30,
controls the flux threshold and the intercept limits. Thresholds control the raytrace
by providing limits on how long TracePro follows a ray. The most commonly used
limit is the flux threshold. Rays started by TracePro from a source are traced and
split until the flux carried by a ray component is below the threshold. At that point,
that branch of the ray tree is terminated.

FIGURE 5.30 - Raytrace Thresholds Tab

The raytrace can also be controlled by limiting the number of intercepts. The
number of intercepts is the number of ray-surface intersections that a particular
ray path contains. You can terminate rays based on the following criteria:
• Total number of ray-surface intercepts for a ray path

5.46 TracePro 2022 User’s Manual


Raytrace Options

• Total number of scattered components for a ray path


• Number of randomly scattered components for a ray path
• Number of components scattered by optical surfaces for a ray path. Optical
surfaces are defined by a prescription property
For each starting ray, these limits control the number of intercepts allowed along
each path. A ray will be terminated after it reaches the set intercept limit.The Total
Intercepts limit directly controls the depth of the ray tree by controlling the number
of nodes or branch points, while the other limits and thresholds indirectly control it.
For example, if you set Total Scatters to 5, a ray will be terminated immediately
after scattering for the fifth time.

Simulation and Output Standard Expert

The Simulation and Output tab of the Raytrace Options dialog box lets you control
what data is saved during a simulation raytrace, and what results can be viewed
after the raytrace is finished. To save ray data for an exit surface so that an
irradiance map can be generated, check the Collect Exit Surface Data box.
Checking the Collect Missed Rays Candela Data check box will save the rays that
escape the model and “go off to infinity”. These rays are used for candela plots.

FIGURE 5.31 - Simulation and Output Tab

Collect Exit Surface Data


Data is collected for the Exit Surface defined by the Exit Surface Property. After
the raytrace is complete, irradiance maps and ray tables can be displayed for the
Exit Surface.

TracePro 2022 User’s Manual 5.47


Ray Tracing and Optimization

Collect Missed Rays Candela Data


Data is collected for rays that miss all objects, escape the model, and “go off to
infinity.” After the raytrace is complete, Candela Plots can be displayed.

Collect Path Sort Data


Data is collected for unique ray paths. After the raytrace is complete you can
display a Path Sort Table.

Index file name


The Index file name option is used to collect the simulation data files generated
during a raytrace. This is used in conjugation with the “Save Data to Disk” option
below.
One index file, with the NDX extension, can accumulate several simulation files,
with SIM extensions, for several raytraces. When the simulation raytrace is
started an options to specify a note for the raytrace is presented. The note is
stored in the index file with links to the SIM data files. The SIM files are stored with
the following name convention.
1. Missed Rays Candela Data - BaseName_num_can.sim
2. Exit Surface Data - BaseName_num_exXX.sim
Where BaseName corresponds to the Index file name, num is the raytrace
number starting from 1 and XX is the Exit Surface number starting from 1. See
“Simulation Mode” on page 5.55

Save Data to Disk during Raytrace


During the raytrace, TracePro may save the Exit Surface and Missed Rays
Candela Data in a binary format (SIM file). One reason for using this option is to
minimize RAM consumption during the raytrace. In addition, the data from the Exit
Surface SIM file can be recalled from the Simulation File Manager (See
“Simulation File Manager” on page 6.71).

Save Ray History to disk


A Ray History table for the Exit surface is generated and saved as a text file for
the model. The file name is formed by appending “-rayhistory.txt” to the model
name. Data is not written to disk if this option is not selected.

Save Bulk Scatter data to disk


A set of positions and flux values for each bulk scattered ray is generated and
saved into a text file for the model. The file name is formed by appending “-
scatter.txt,” to the model name. Data is not written to disk if this option is not
selected.

Simulation Options for TracePro LC LC

For TracePro LC , Simulation information is set in the Options tab of the Raytrace
Options dialog box, as shown in Figure 5.32. The two options let you control what
data is saved during a simulation raytrace. To save ray data for an exit surface so
that an irradiance map can be generated, check the Collect Exit Surface Data

5.48 TracePro 2022 User’s Manual


Raytrace Options

box. To save ray data for candela/intensity plots, check the Collect Missed Rays
Candela Data checkbox.

Collect Exit Surface Data


Data is collected for the Exit Surface defined by the Exit Surface Property. After
the raytrace is complete, irradiance Maps and ray tables can be displayed for the
Exit Surface.

Collect Missed Rays Candela Data


Data is collected for rays that miss all objects and are traced beyond the model.
After the raytrace is complete, Candela Plots can be displayed.

FIGURE 5.32 - Options Tab for TracePro LC

Advanced Options
The Advanced tab of the Raytrace Options dialog, as shown in Figure 5.33,
provides controls to enhance ray-trace speed, and change the precision for
tracing rays in gradient index materials. To control the ray-trace speed you can
choose from two types of voxels. You also have the option to represent NURBS
surfaces by facets.

TracePro 2022 User’s Manual 5.49


Ray Tracing and Optimization

FIGURE 5.33 - Advanced Tab (Uniform Options)

Voxelization Type
To speed up a ray-trace, TracePro uses object space partitioning to break up a
model into small regions called voxels. Think of voxels as 3D pixels, including
depth along with width and height. Using voxels involves a trade-off of ray-trace
speed versus audit speed and memory consumption. For most analyses, you can
leave this setting at Uniform. However, some models with widely separated
geometry may see a speed improvement with octree voxels.

Voxel Parameters
The Voxel Parameters, in the center of the Advanced tab, change depending on
whether you choose Uniform or Octree voxels.

Uniform voxels
Typically, you would start the analysis of a complex or large model by tracing rays
at the Fastest Audit or Mixed Audit/Raytrace setting. Perform any system setup
and determination of thresholds with a relatively small ray set. When you are
ready to trace many rays, change to Fastest Raytrace. TracePro will calculate an
optimal number of voxels to use, but no more than the number in Set maximum
voxel count. If you feel that your model would benefit from more voxels than
TracePro is choosing, select Maximize Voxel Count and set the Set maximum
voxel count number to the number of voxels you desire. Be aware that more

5.50 TracePro 2022 User’s Manual


Raytrace Options

voxels use more memory. There is a minimum of 4 bytes of memory allocated for
each voxel, and more memory is allocated for bigger models. At 4,000,000 voxels,
you can expect a minimum of 16 MB of memory to be consumed. Figure 5.34
shows the voxels generated for a simple telescope using the Fastest Audit
selection.

FIGURE 5.34 - Uniform Voxels for a simple telescope.

Octree voxels
If your model is very spread out with large regions of empty space, you may see
an increase in ray-trace speed by choosing octree voxels. Octree voxels are
created recursively. TracePro starts with one voxel containing all the geometry in
your model, then subdivides it into eight octants, or voxels, using three dividing
planes. Each of these smaller voxels can be subdivided as well, and so on until
criteria determined by the voxel parameters are met, creating a tree-like structure
of voxels. Where there are more surfaces, edges, and facets, more subdividing
will take place. This technique creates more voxels where they are needed, and
fewer voxels where there is empty space. The Maximum Tree Depth determines
the maximum number of times voxels can be subdivided. A usual number to use
for this is in the range of two to six. The maximum number of voxels created is on
the order of 8N, where N is the maximum tree depth. For example, with N=2, no
more than about 64 voxels will be created, while for N=6, no more than about
262,144 voxels will be created. Octree voxels use more memory per voxel than
uniform voxels, with each voxel requiring at least 56 bytes, so with N=6, there may
be 14MB or more of memory consumed. Also, empty octree voxels are slower to
traverse than uniform voxels.

TracePro 2022 User’s Manual 5.51


Ray Tracing and Optimization

FIGURE 5.35 - Advanced Tab (Octree Options)

The Optimal settings are criteria for TracePro to create more voxels. TracePro will
create more voxels during the audit until all of these criteria are met or until the
Maximum Tree Depth is reached. The Optimal Edges in Voxel and the Optimal
Faces in Voxel settings are maximum number targets, so voxel subdivision will
continue until these numbers are reduced to equal or less than the numbers
entered. In normal usage, you will not need to change these settings. Figure 5.36
shows Octree voxels generated for the simple telescope shown in Figure 5.34.
The optical elements are widely spaced and you can see how few voxels are
created between the elements while many are created close to surfaces and
edges.

5.52 TracePro 2022 User’s Manual


Raytrace Options

FIGURE 5.36 - Octree Voxels for a simple telescope.

Ray tracing and spline surfaces


When you import a model from another CAD program, some of the surfaces may
be NURBS or spline surfaces. If you expand each surface in the system tree, the
type of surface is displayed. In general, any surface that is not a primitive surface
type is a spline. The primitive surface types in TracePro are Plane, Sphere, Cone,
and Torus. For example, if a surface was parabolic or elliptical in the CAD
program, it will be exported as a spline. If a surface is created as a Parabolic
Reflector in TracePro, it is represented as a paraboloid of revolution while in
TracePro but will be exported as a spline. Therefore, a parabolic reflector that is
created in TracePro will be ray-traced much faster than one created in a CAD
program and imported into TracePro. Finally, if you create, for example, a
parabolic reflector in TracePro and alter it by a Boolean operation, it will become a
spline. In this case the ray-trace speed will slow somewhat.
You may be able to convert some of the spline surfaces to primitive surfaces if
they started as primitive surfaces but were changed to splines by the CAD
program as it exported the file. This may happen depending on the originating
CAD program and the settings that were in place when the file was exported.

Gradient Index Substep Tolerance Standard Expert

The Gradient Index Substep Tolerance lets you trade-off accuracy vs. speed while
tracing rays through an object with a Gradient Index property on it. TracePro uses
an adaptive stepping algorithm. Each substep takes a curved trajectory through
the gradient index material. The length of the substep is a function of many
variables including the gradient index profile in the local region of the material and

TracePro 2022 User’s Manual 5.53


Ray Tracing and Optimization

the user-supplied substep tolerance. As the ray proceeds through the material,
optical position and optical path errors are not permitted to exceed this tolerance.
When this tolerance is met, a new substep is created. A smaller tolerance will
improve accuracy at the expense of raytrace speed, while a larger tolerance will
speed up the raytrace at the expense of accuracy. The optimal setting depends on
the specific characteristics of your model. You should experiment with different
settings for a particular model to determine the optimal setting.

Ray Tracing modes


TracePro allows you to select different modes for storing rays during the raytrace.
These are selected by checking one of the checkable items at the bottom of the
Raytrace menu. You can choose either Analysis Mode or Simulation Mode.
This allows you to trade off the amount of information that is available versus the
amount of memory that is consumed. Analysis Mode generates more ray data but
consumes more memory, while Simulation Mode generates less data and
consumes less memory. To activate one or the other of the choices, simply check
one of the items before beginning the raytrace. If you choose Simulation Mode,
you will have to specify an exit surface before the raytrace starts if you wish to see
an irradiance map after the raytrace is completed. TracePro will not allow the
raytrace to be done and will warn the user if an exit surface has not been specified

Analysis Mode
In an Analysis Mode raytrace, TracePro saves all of the ray data that is generated
during the raytrace. This allows you to view the irradiance on any surface in the
model after the raytrace is completed. To do this requires a large amount of
memory. The more ray splitting that takes place for each ray and the more surface
intercepts that rays undergo before they are terminated, the more memory is
required for each starting ray. A raytrace started with many rays (tens or hundreds
of thousands or more) and with many ray-surface intercepts for each ray can
require hundreds of megabytes of memory.
TracePro allocates memory as needed during the raytrace by requesting memory
from Windows. Initially, your physical RAM will be used. If all the physical memory
is used, the operating system will allocate memory from virtual memory. Virtual
memory is disk space that is used like physical memory. Accessing virtual
memory is much slower than accessing physical memory, so if TracePro is doing
a raytrace that requires a large amount of memory, the progress of the raytrace
will slow as it begins to use virtual memory. If all available virtual memory is used
up, TracePro will discontinue the raytrace. You can increase the amount of virtual
memory available from the Windows Control Panel, as your available disk space
permits. If you are not comfortable doing this yourself, you should seek the help of
a system administrator or other expert.
You can increase the amount of physical memory by installing more RAM in your
computer. The maximum RAM that can be used is 8TB, although only a fraction of
that can be accessed by Windows (128GB for Vista, 192GB for Windows 7,
128GB for Windows 8 and 10, 512GB for Windows 8 and 10 Professional and
Enterprise). Many Windows Server editions can access 4TB of RAM. See
microsoft.com for the most current information.
To perform an analysis mode raytrace, select the Analysis Mode item at the
bottom of the Raytrace menu. If there is a  next to the Analysis Mode item,
TracePro is already in Analysis Mode. After the raytrace is complete, you will be

5.54 TracePro 2022 User’s Manual


Ray Tracing modes

able to examine the irradiance at any surface. You will also be able to display
candela plots.

Saving and Restoring a Ray-Trace


An analysis mode raytrace can be saved to disk for later display. To do this, first
put TracePro into Ray Saving Mode by selecting File|Save Ray Data.
This action toggles the Save Ray Data menu item on and off. When the menu item
is checked and you save a TracePro model, a second file with the extension ray is
also saved. The ray file contains data for all the rays from the most recently
completed raytrace.
To save ray data, first be sure that TracePro is in ray saving mode. You can check
this by looking at the File menu and confirming that the Save Ray Data item is
checked. (If there is a  next to the menu item, it is checked. Selecting it again
makes it unchecked.) Then select File|Save As and type in a file name for the
oml file. Press Save to save the file, and TracePro will save both the oml file and
the ray file.
It is important that the oml file and ray file stay synchronized. Changes to the
geometry and properties in the oml file will make the saved rays obsolete and
unrepresentative of the model. Therefore, you should not change the model
unless you are planning to re-do the raytrace. If you wish to keep a progression of
models with their associated ray data, same the OML file to a new name using
File|Save As with the menu option File|Save Ray Data checked on.
To restore a saved raytrace, simply open an oml file that has an associated ray
file. TracePro will find and open the ray file at the same time, and display the rays
(providing the Analysis|Display Rays menu item is checked). Once the rays
are restored, you can sort them using Analysis|Ray Sort and display irradiance
maps and Candela plots.

Simulation Mode
In Simulation Mode, only a small amount of ray data is saved during the raytrace.
This allows you to trace many more rays before virtual memory is used or before
all memory is used. Thus you can do raytraces with much larger numbers of rays
in Simulation Mode than in Analysis Mode. However, since much less ray data is
saved for a Simulation Mode raytrace, you do not have the flexibility of displaying
irradiance for any surface after the raytrace is completed.
Before you begin a raytrace, you must select one or more Exit Surfaces for which
ray data will be saved during the raytrace or the option to save Missed Rays
Candela Data. During the raytrace, only the segments of the rays that are incident
on the defined Exist Surfaces and/or Missed Rays Candela Data rays will be
saved.
The exit surfaces can be any surface in the model. To select an exit surface, first
select Edit|Select Surface or press the Select Surface button on the toolbar to
go into surface selection mode. Then select Define|Apply to open the Apply
Properties dialog box, and press the Exit Surface tab. Select the surface that you
wish to be the exit surface either graphically or using the System Tree. This
surface is the one for which you will be able to display irradiance maps. Finally,
check the Exit Surface check box and press Apply.

TracePro 2022 User’s Manual 5.55


Ray Tracing and Optimization

Simulation Dialog
After the raytrace is started, a dialog is displayed to confirm that the proper data
will be collected. The dialog prompt is optional but is defined to be active by
default. To disable/enable the prompt, use View|Options|View.

FIGURE 5.37 - Simulation Prompt.

When data is being saved to SIM files, an entry for Notes is provided. See “Index
file name” on page 5.48

FIGURE 5.38 - Simulation Prompt when data is being saved to a file.

Simulation Options Standard Expert

In order for TracePro to save data during the raytrace, you must indicate whether
you want to save exit surface data, data for candela plots, and/or data for Path
Sorting. Do this by selectingRaytrace|Raytrace Options. The Simulation &
Output tab lets you choose what type of data will be saved during the raytrace.
You can choose any of these features independent of the others. You must check
the appropriate box or boxes before performing the raytrace in order to be able to
view the results after the raytrace is finished.

5.56 TracePro 2022 User’s Manual


Ray Tracing modes

FIGURE 5.39 - Raytrace Options dialog box for TracePro Standard and
Expert.

The Save data to disk during raytrace option stores data for an irradiance plot to a
binary file on disk. No RAM is used to collect the Exit Surface data. See the online
help for details on the use and limitation of this option. See “Index file name” on
page 5.48
Three output text files can also be generated during the raytrace, and the Save
Bulk Scatter data to disk option can be used in Analysis and Simulation modes.
When the Save Ray History to disk option is enabled,
• A ray history table for the Exit surface is generated and saved into a text file for
the model. See “Ray Histories” on page 6.55
• The file name is formed by appending “-rayhistory.txt” to the model name.
• The format is identical to an exported ray history from analysis mode. See
“Saving the Ray History Table in a File” on page 6.57
When Collect Path Sort Data is enabled, a set of ray paths absorbed at the Exit
surface(s) is generated and saved into a text file for the model. The file name is
formed by appending “-raypaths.txt” to the model name. Each ray path is unique,
such that any two paths are considered the same if the sequence of the surface
intersections and intercept type of each intersection is identical. The output file
lists the number of paths, the flux in each path and the intersection order with
intercept type and surface name. The list is sorted in descending order of flux
absorbed by each surface. Ray paths are used in stray light analysis and are very
useful for ghost ray identification.

TracePro 2022 User’s Manual 5.57


Ray Tracing and Optimization

When Save Bulk Scatter data to disk is enabled, a set of positions and flux values
for each bulk scattered ray is generated and saved into a text file for the model.
The file name is formed by appending “-scatter.txt” to the model name. The object
in which the scatter occurred is also listed.
NOTE: This option is also available during analysis mode.

Simulation Data for LC LC

The Collect Exit Surface Data and Collect Missed Rays Candela Data options are
found on the Options tab in TracePro LC.

Optimization Standard Expert

TracePro has two methods of optimization available in the Standard and Expert
editions. Each optimization function is bundled in a separate application that
communicates with, and drives the TracePro ray-trace engine via scheme
commands. Each optimization function is self-contained and has its own help
system. The optimizers are designed to be very interactive and intuitive to use.
Optimizers are accessed via the Optimize menu selection

Interactive Optimizer
The Interactive Optimizer is a utility for designing and optimizing reflectors and
lenses for illumination applications. It is particularly useful for designing LED
lenses, but it can be used for other applications. Using the Interactive optimizer,
you can define an analytic or spline surface, then specify variables and a target,
and the optimizer will vary the design to meet the target. When specifying a spline
surface, the control points of the surface can be made variable in three
dimensions. You can also create a starting design by pulling on control points with
the mouse, with rays updating automatically as you change the design.

LC Note for TracePro LC: In TracePro LC, the Interactive Optimizer is named
Interactive Modeler, and is located on the Geometry menu. It enables you to
sketch profiles of geometrical objects, but you cannot optimize them.
The Interactive Optimizer has its own help system.

Texture Optimizer II
The Texture Optimizer II helps you optimize structured Liquid Crystal Display
(LCD) backlight components including Brightness Enhancement Films (BEFs),
Turning Films, and extraction features in light guides. With a TracePro model of
the LCD, the utility generates a Textured pattern of geometry on any surface,
optimized for uniformity or flux.
The Texture Optimizer II has its own help system.

5.58 TracePro 2022 User’s Manual


Examining Raytrace Results

CHAPTER 6 Analysis

Examining Raytrace Results


After a raytrace you need to assess the data that results from it. The Analysis
menu provides several ways to view raytrace data. Displaying Rays and Ray
Sorting let you view the ray data. Irradiance Maps, Ray Tables and Polarization
Maps provide ray results for each surface in the Model if within Analysis mode and
on Exit Surfaces in Simulation mode. Candela Plots display angular distributions
of ray data in the Model. The Volume Flux Viewer can provide insights into the flux
distribution within Model objects.
A variety of Reports are available to help you analyze the ray data and Model
properties from the Reports Menu.
The Tools menu includes additional features to improve the raytrace results.

Analysis Menu
Most raytrace results are accessible from the Analysis Menu and are described in
this chapter. Ray Tracing is also initiated by menu items contained in the Analysis
menus and are described in Chapter 5.

Display Rays
The Analysis|Display Rays selection allows you to control the display of rays.
In Analysis Mode, rays are displayed by default after a raytrace is finished or
canceled. Rays cannot be displayed in Simulation Mode. To turn off the display of
rays, simply select Analysis|Display Rays. The state of Display Rays is
indicated by the check mark  next to the menu item. If many rays have been
traced with many splits or “branches,” it can take several minutes for TracePro to
finish displaying the rays. You can set TracePro to update the display of rays only
at your request by de-selecting Window|Auto Update. Then the display of rays
will not be updated until you press F5 or select Window|Refresh. Rays may also
be timed during the drawing process with the limit set as a preference. See “Ray
Display” on page 2.59.
You can also affect what rays are displayed using Ray Sorting as described
below.

Ray Colors
The Ray Colors dialog box (Figure 6.1) provides four ways of controlling ray
colors:
• Flux-based ray colors
• Wavelength-based ray colors
• Source-based ray colors
• All rays one color
Any color can be changed by clicking on its color bar, which opens the Windows
standard color palette.

TracePro 2022 User’s Manual 6.1


Analysis

Flux-based ray colors


There are three default color palettes for monochromatic ray flux display. Along
with the Default Red-Green-Blue coloring, there are Extended and Logarithmic
palettes which include 10 different levels. Each of these may be modified to use
different colors for the various levels, change the relative crossing points of each
level, and add new levels.

FIGURE 6.1 - Ray Colors dialog box

To change the color palette


1. Open the Ray Colors dialog using the Analysis|Ray Colors
2. Select the Desired Palette
3. Press Update Ray Colors

To create a Custom palette


1. Open the Ray Colors dialog using Analysis|Ray Colors

6.2 TracePro 2022User’s Manual


Analysis Menu

2. Select the Desired Palette to modify


3. Add crossover points using the Add Row button by entering a value in the New
Color Boundary box
4. Delete crossover points by selecting a row and pressing the Delete Row button
5. Change the ray color by clicking in the Color cell and selecting the new color
from the Color Picking dialog
6. Press the Replace Custom Palette button
7. Press Update Ray Colors
Note: the Custom Color Palette will be stored in the OML file.

Wavelength-based ray colors


This section of the Ray Colors dialog box allows you to display the rays in either
of:
• Red to Blue (false color)
• Color of wavelength (non-visible wavelengths in black)
With Red to Blue (false color) coding, rays will be colored in descending order of
to wavelength from red to blue (long to short wavelengths). With Color of
wavelength coloring, the color of each wavelength, according the CIE 1936
standard, will be used to display the rays for that wavelength.

Source-based ray colors


This section uses the color of each source to color the rays. The source color can
be changed by clicking on the color bar and selecting a new color. The color can
also be changed in the source definition.

All rays one color


You can choose to have all rays displayed in the same color. The default color is
black. You can change the color by clicking on the color bar.

Path Sort Table


The Path Sort Table selection opens a window to display unique ray paths
reaching the selected surface. A unique ray path is one that has a unique
combination of surfaces and intercept types along the path of the ray. The
columns include the number of rays along the path, absorbed flux, and incident
flux. You can sort the table by column in descending order by clicking on the
column header. Clicking on the header a second time sorts the table in ascending
order. Individual paths can be expanded to show the detail of the path, including
surfaces intersected and the intercept type at the intersection. To expand a path,
double-click on the + next to the path number. You can right-click to open a pop-
up menu with more Expand and Collapse options.
To display the rays for one or more paths in the Model Window, select the desired
paths by clicking on row number(s), using Shift- or Ctrl-click for multiple slections,
then select Analysis|Display Selected Paths. In Analysis Mode, all of the
rays of the selected paths are displayed. In Simulation Mode, only the first ray of
each of the selected paths is displayed. If the Irradiance/Illuminance Map window
is also open, the map will be updated to include only those selected paths.

TracePro 2022 User’s Manual 6.3


Analysis

The Display Selected Paths feature takes priority over the Display Selected Rays
feature. This means that if the Display Selected Paths feature is turned on, the
Display Selected Rays feature will be disabled, and its menu selection will be
displayed in gray to indicate that it is not available.
You can save the table as a text file by selecting File|Save As when the Path
Sort Table is the active window.

Simulation Mode
In simulation mode, path sorting must enabled before the raytrace begins by
selecting Collect Path Sort Data in the Raytrace Options dialog box, Simulation &
Output tab.

Analysis Mode
In Analysis Mode, path sorting is always available by choosing Analysis|Path
Sort Table after the raytrace is complete.

Memory Consumption
Path Sorting may require a large amount of memory to store the paths.
Complicated models may generate tens or hundreds of thousands of paths,
requiring several GB of memory. If your model requires more memory for path
sorting than is available on your computer, you will not be able to use path sorting.

The figure below shows a Path Sort Table with path 1 expanded.

FIGURE 6.2 - Path Sort Table

Path Sort Table Settings


Path Sort Table settings enable you to customize the filtering of paths according to
your needs. You can filter by source, wavelength, number of intercepts along a
path. You can also choose the percent of rays to display, or make custom filters to
further control the table. The settings are summarized in Table 6.1.

6.4 TracePro 2022User’s Manual


Analysis Menu

TABLE 6.1. Path Sort Table Settings


Sources Select from the list which sources you wish to be included in the Path
Sort Table.
Wavelengths Select from the list which wavelengths you wish to be included in the
Path Sort Table.
No. of intercepts Filters the paths by the total number of ray-surface intercepts along a
path. Enter intercepts and/or ranges of intercepts separated by com-
mas. For example:
5-8,10,12
% of rays to display When Analysis|Display Selected Paths is checked, this
entry controls the percent of rays matching the selection that will be
displayed.
Filter Editor Opens the Path Sort Filter Editor window that allows you to define one
or more filters for refining the path sort table.
Select filters Apply one or more filters to the path sort table by using the checkbox
for each filter.
Apply Applies all the settings to the path sort table.

Path Sort Filter Editor


The Path Sort Filter Editor allows you to refine the path sort table by selecting
which surfaces or objects must (or must not) be intersected by rays along the
path. Surfaces and/or objects matched with intercept types can be combined
together using Boolean AND and OR operators.

To edit filters, click the Filter Editor button in the Path Sort Table window. The Filter
Editor window is shown in Figure 6.3. The meaning of each selection is
summarized in Table 6.2.

FIGURE 6.3 - Path Sort Filter Editor

TracePro 2022 User’s Manual 6.5


Analysis

TABLE 6.2. Path Sort Filter Editor items.


Name Choose the name of the filter you wish to edit from the list.
Add Filter Add a new filter for use by the current model's Path Sort Table.
Delete Filter Delete the current filter.
Insert Selection Add new row(s) to the filter, one row for each surface, object, or group
selected in the Model Window for the current model.
Add Row Add a (blank) row to the current filter.
Delete Row Delete the selected row(s) in the current filter.
Operator Select a Boolean operator (AND or OR) to be used to combine the
result of the current row with the result of the previous row(s).
Object/Group Select an object or System Tree Group to be used in the current filter
row.
Surface Select a member surface of the selected Object/Group. Select <Any>
to indicate that a ray intersecting any member surface of the object or
group can satisfy the test. For bulk scatter intercept types (RandVol-
ume or ImpVolume), the Surface selection is ignored.
Intercept Type Open the Intercept Types window for selecting intercept types for the
current row.

Path Sort Filter Intercept Types window


To select which Intercept Types are used for the current row, click on the Intercept
Type cell for the desired row to open the Intercept Types window as shown in
Figure 6.4. You can select as many specific intercept types as you wish, and they
will be used in the current row of the filter.

FIGURE 6.4 - Path Sort Filter Intercept Types

Miss

6.6 TracePro 2022User’s Manual


Analysis Menu

Select Miss to specify that all rays must miss the selected surface(s) in order to
pass the filter. Selecting Miss will clear all other Intercept Type selections.
Any
Select Any to specify that a ray of any intercept type will pass the filter. Selecting
Any will clear all other Intercept Type selections.

Irradiance Maps
Irradiance or illuminance maps can be viewed by selecting
Analysis|Irradiance Maps. An irradiance map will be displayed showing
irradiance incident on the currently selected surface. If the surface is not a plane,
the irradiance will be projected onto a plane. The orientation of the projection
plane is controlled in the irradiance Options dialog box accessed from
Analysis|Irradiance Options...,or by right clicking in the Irradiance Map
window and selecting Irradiance/Illuminance Options... Other settings, as
described below, are controlled within this dialog. The map can be displayed in
shades of gray with white being the highest irradiance and black being zero
irradiance, vice versa, or in one of a selection of false color palettes.
The orientation of the irradiance map is determined by the Normal Vector and the
Up Vector, as specified in the Analysis|Irradiance Options dialog box. The
normal vector is normal to the projection plane on which the map will be
displayed, and the up vector determines which side of the map will be at the top of
your screen. The normal vector can be defined to point out from or into an object.
Reversing the direction will cause the image to be flipped from left to right. If, upon
displaying the irradiance map, it seems nonsensical, check the orientation of
these vectors. You can have TracePro choose the Normal and Up vectors by
clicking Automatically calculate Normal and Up Vectors. Click Apply to update the
display.
An irradiance map is the irradiance in watts per unit area or lux, incident or
absorbed on the selected surface. The irradiance map will appear noisy if an
insufficient number of rays is traced. The noise and the blockiness of the pixels
can be smoothed by selecting Smoothing in the Irradiance Options dialog box,
with a corresponding reduction in resolution. The only cure for noisy results is
more rays per pixel. You can create more samples either by increasing the
number of rays started, or increasing the number of random rays and importance
sampled rays generated when you are simulating scattered light.

TracePro 2022 User’s Manual 6.7


Analysis

Irradiance Map Options

FIGURE 6.5 - Irradiance Options dialog box

Irradiance map options are controlled through the Irradiance Options dialog box,
accessed by selecting Analysis|Irradiance/Illuminance Options... or by
right-clicking on the irradiance map and selection Irradiance/Illuminance
Options... from the context menu. Each option and its function are described in
the sections that follow.

Map Data
The Map Data defines what quantities are displayed in the plot.

Quantities to Plot
Selects the map type to display. You can choose from:
• Irradiance, a plot of power per unit area of radiation incident on or absorbed
by a surface,

6.8 TracePro 2022User’s Manual


Analysis Menu

• CIE (x, y), a plot of color in CIE xy coordinates,


• CIE (u’,v’), a plot of color in CIE u’v’ coordinates,
• True Color
When you display either a CIE xy or u’v’ plot, a plot of the color of the light incident
on the surface is displayed, at full brightness. In addition, a CIE diagram is
displayed next to the surface plot. When you roll the mouse cursor over the
surface plot, a small circle is displayed at the xy or u’v’ coordinates, and the
Correlated Color Temperature (CCT) is displayed above the circle. The xy or u’v’
values are also displayed in the Status Bar at the bottom of the TracePro
application window.

Rays to Plot
You can observe a map of absorbed, incident, or exiting rays. Incident irradiance
maps can be misleading when the selected surface is hit several times by the
same ray. For example, a surface between two infinite parallel mirrors would have
the same ray intersect the surface until the ray fell below the flux threshold or
intercept threshold, generating an incident flux many times greater than the
starting flux of the ray. Exiting ray irradiance maps can also be misleading for the
same reason. In addition, take care that you do not interpret an exiting ray
irradiance map as the appearance of the surface. To display the appearance of
surfaces, use the Luminance Map.

Normalize to
Normalize the map data according to the selection. The choices are None,
Average emitted irradiance, Peak irradiance.
This option allows you to have the irradiance map normalized. The footer of the
maps always displays the total flux in the map as well as the flux divided by the
total emitted flux. If you select None, and the raw irradiance values will be
displayed.

Example 1: System Transmittance


Suppose you need to calculate the system transmittance of an optical system.
You would probably use the grid raytrace option, and the emitted flux is equal to
the sum of the flux in all the emitted rays. When you display an irradiance map,
the system transmittance is equal to the total flux, displayed at the bottom of the
irradiance map window, divided by the emitted flux. To get the system
transmittance, simply read the “Flux/Emitted Flux” value on the footer of the map.

Example 2: Lighting Efficiency

Suppose you need to calculate the lighting efficiency of a luminaire in illuminating a


plane. You would probably choose the Surface Source raytrace option, and the
emitted flux is equal to the flux you specified when you defined the sources. When
you display an irradiance map, the total flux incident on the observation plane is dis-
played at the bottom of the window. The lighting efficiency is equal to the total flux
divided by the emitted flux. You can get this number simply by reading the “Flux/
Emitted Flux” value on the footer of the map.

Example 3: Point Source Transmittance


The Point Source Transmittance or PST is commonly used as a measure of stray
light in imaging systems. It is defined as the irradiance at the image surface

TracePro 2022 User’s Manual 6.9


Analysis

divided by the incident irradiance from a point source. To calculate PST, first
define a collimated Grid Source (i.e. Uniform or Lambertian with half-angle equal
to zero). After performing the raytrace, select Normalize to Average emitted
irradiance and display the irradiance map. The units will be (W/m2)/(W/m2), which
you can interpret directly as PST.
If Quantities to Plot is set to True Color, the Normalize to: options change to None,
Highest Color, and Exposure Level. Selecting Highest Color will normalize the
displayed color value in the plot. Selecting Exposure Level will normalize the plot
to display a saturated white color, even is the plot is monochromatic. For example,
with green light the saturated values would be (0,255,0).

Set Max/Min
The Max/Min values provide thresholds for the plot scale. If a Max value is set it
will be used for the maximum value used in the irradiance plot. Any values which
exceed the Max value will be displayed at the Max value. The Min value works in
the same manner. If the Log Scale is set the Min value is disabled.

Display Options
The display options control the plot output.

Smoothing
If the smoothing box is checked, the irradiance distribution will be smoothed using
a Gaussian smoothing kernel of the form

1 – x2 + y2    22 
K  x y  = ------------2- e , (6.1)
2 
where  is the waist radius of the Gaussian, taken as the width of the map divided
by the No. of Pixels value. For example, the default value of 50 means that the
waist radius of the kernel is 1/50 of the width of the map.
The smoothing is done by convolving this kernel with the irradiance distribution,

E smooth  x y  =   E  x' y' K  x – x' y – y'  dx' dy' (6.2)

The convolution is done by Fourier transforming, applying a filter, and inverse


Fourier Transforming.

Contour Plot
Selecting Contour Plot creates a topographic map of the irradiance. Smoothing is
always turned on when you select Contour Plot. The number of contours and
contour levels is described in the Contour Levels section below.

Local Coordinates
The corners of the plot are labeled with coordinate data for the selected surface.
By default the corners are labeled in global X, Y, Z points. Checking this item will
display the corners in local X, Y coordinates.

Gradient Display
Checking this box causes a continuous gradation of colors to be displayed instead
of discrete contours.

6.10 TracePro 2022User’s Manual


Analysis Menu

Convert to foot-candles
Scales plotted values to foot-candles.

Log Scale
Checking this box displays the irradiance on a logarithmic scale. This is especially
useful when you need to see details in the very lowest irradiance values. This
might be needed, for example, in a stray light analysis.
If you check Logarithmic Scale and Smoothing at the same time while also
selecting a large number for Map Count (greater than 40), you can see artifacts in
the display of the irradiance map in the form of cross-shaped patterns surrounding
sharp peaks in the pattern. This is a result of aliasing and should be ignored.

Relief Plot
This option produces a 3D relief plot using OpenGL. See Figure 6.7 on page 6.13.

Profiles
Checking this box causes cross-sectional plots of the Irradiance/Illuminance to be
displayed. When you press Apply, additional plots are shown that contain the
profiles. To change the axes of inspection for the Profiles option, click a different
point in the Irradiance/Illuminance map. A new set of horizontal and vertical axes
are set at this point, and they are displayed in the profiles area of the window.
Each profile passes through the point you selected with the mouse. Each time you
select a new point, the display is updated. Clicking a point outside the Irradiance/
Illuminance map (but still inside the Irradiance/Illuminance map window) causes
the profiles to become blank. To remove the profiles altogether, uncheck the
Profiles check box and press Apply. See Figure 6.6 on page 6.12.
The vertical axis of the profile plot corresponds to the Irradiance/Illuminance
scale. The horizontal axis corresponds to the linear size of the plotted area where
the left hand side of the plot shows the position of the left side of the horizontal
cursor line and the bottom position of the vertical cursor line. Two profile plots are
drawn for the two cursor lines displayed.

No. of Pixels
The No. of Pixels value determines the resolution of the display on the irradiance
map. The value is the number of pixels in the irradiance map in both the horizontal
and vertical directions. TracePro displays a square irradiance map and square
pixels. When Smoothing is enabled the No. of Pixels value is used to control the
degree of smoothing applied to the data.

FFT Grid
Sets the size of the data grid for smoothing. The smoothing uses a Fast Fourier
Transform (FFT) which requires a grid size of a power of 2. This value is also used
to set the number of pixels in the irradiance map when it is saved as a text file with
smoothing turned on.

Symmetry
Using this option you can take advantage of known symmetry on an irradiance or
illuminance map. A smoother distribution can be obtained from fewer rays. The
five symmetry selections are:
• None - This is the default where no symmetry is applied.

TracePro 2022 User’s Manual 6.11


Analysis

• Left / Right - Symmetry is applied between the left and right halves of the map.
• Up / Down - Symmetry is applied between the upper and lower halves of the
map.
• Quadrant - This is the combination of Left / Right and Up / Down symmetry.
• Rotational - Symmetry is applied about an axis perpendicular to the center of
the map.
The symmetry selection should be used with caution. TracePro will force
symmetry onto the irradiance/illuminance map even if your model does not
possess symmetry. The user, through this option, conveys to TracePro that the
data being plotted actually has the selected symmetry. This option should be used
with caution, and only for evaluating itermediate results. For final results, select
Symmetry None and be sure you have traced enough rays to accurately predict
the irradiance or illuminance.

Color Map
Use this drop-down list to opt for either grayscale or one of several color-coded
schemes. The choice of color affects both the display and the contour map
display.

Surface boundary Profile cursors and plot

FIGURE 6.6 - Irradiance Map with Profiles for Elliptical Reflector Demo

6.12 TracePro 2022User’s Manual


Analysis Menu

FIGURE 6.7 - Irradiance Map contours on Relief Plot for Elliptical Reflector
demo.

Contour Levels
This controls how contours are displayed for Contour plots.

Auto levels
The Auto levels check box controls the contour levels in the contour plot.
If the Auto levels check box is checked, TracePro divides the display of intensity
values evenly into the number of levels defined in the Number entry in the Levels
part of the dialog box. Select the Apply button to update the levels with the new
values from the dialog box. The legend is updated as well.
If Auto levels is not checked, TracePro uses the levels defined in the list box on
the right hand side of the Levels section of the dialog box. You can customize the
levels by moving numbers in and out of the box. Move numbers from the Selection
box into the list by pressing the > button, and out (to remove them from the list) by
pressing the < key.
You can use Auto levels for a desired number of contours and TracePro will
equally space the number over the flux or candela range plotted.

Selection
When the Auto levels box is unchecked, TracePro uses the levels defined in the
list box on the right hand side of the Levels section of the dialog box. You can
customize the levels by moving numbers in and out of the box. Move numbers
from the Selection box into the list by entering a value and pressing the -->
button, and out (to remove them from the list) by selecting the value from the list
and pressing the <-- key.
You can use Auto levels for a desired number of contours and TracePro will
equally space the number of values over range plotted. Values can then be added
or removed from this list.

TracePro 2022 User’s Manual 6.13


Analysis

Number
If the Contour Plot box is checked, this controls the number of contour levels that
are displayed in the contour plot.

Use percent of Max.


This option lets you enter a percent (from 0.0 – 1.0) of the maximum plot value.
TracePro calculates and sets levels for each value entered.

True color options


When Quantities to plot is set to True color, the Contour Levels box changes to
True Color Options. This allows you to set the Brightness and Contrast on a scale
of 0 to 1 and Gamma on a scale of 0 to 3 as shown in Figure 6.8.

FIGURE 6.8 - True color options settings appear in place of Contour Levels
when Quantities to plot is set to True color.

Saturated Color allows you to turn the Saturated Color on or off. The RGB values
can range from 0-255. Saturated Color shows any pixels where any of the RGB
values are 255. You can change the color for saturated pixels by clicking on the
color bar.
Value mode has two options, Raw value and Integer. This setting controls the
values displayed in the Status Bar when you move the mouse pointer over the
map or rendering. The Raw value displays the floating-point RGB values in the
Status Bar as calculated by TracePro to create the True Color image. When
Integer is selected, the actual integer values used in the image (0-255 RGB) are
displayed.
If Normalize to: is set to Exposure value and the Calculate exposure
compensation box is checked, the Exposure compensation value for saturated
white will be calculated automatically. If the Calculate exposure compensation box
is not checked, an Exposure compensation value can be manually entered.

Automatically Calculate Normal and Up Vectors


The Normal Vector and Up Vector specify the orientation of the irradiance map.
When you open an irradiance map window, TracePro uses those vectors to orient
the map. Depending on the surface you have chosen, those vectors might not be
in a sensible direction. You can re-enter the vectors, or you can check the
Automatically Calculate Normal and Up Vectors box. If you check this box and
press Apply, TracePro attempts to choose a sensible projection plane. If the
surface is oddly shaped and/or does not project onto a plane sensibly, you might
have to edit the Normal and Up vectors yourself. See “Normal and Up Vectors” on
page 5.14.

6.14 TracePro 2022User’s Manual


Analysis Menu

Normal Vector
The Normal Vector is a vector in 3D space that is used to orient the projection
plane for the irradiance map. The plane is defined to be perpendicular to the
Normal Vector, and the irradiance incident on the selected surface is projected
onto this plane. When the map is displayed, the normal vector is pointing away
from you.

Up Vector
The Up Vector is a vector in 3D space that is used to orient the projection plane
for the irradiance map. The plane is defined so that the Up Vector is parallel to the
vertical side of the plane. The irradiance incident on the selected surface is
projected onto this plane. When the map is displayed, the up vector will point
toward the top of the screen.

Set Defaults
The options are saved when the Model is saved to disk in an OML file. After the
data is changed, pressing the Set Defaults button will store the data into the
TracePro defaults file to be used the next time TracePro is opened. See “User
Defaults” on page 1.11.

Access to Irradiance Data


The results of an irradiance calculation can be exported from TracePro to another
software package such as a spreadsheet or word processor. Make the irradiance
map window the active window and select Edit|Copy in TracePro. Go to the other
software program (for example, Microsoft Excel) and select Edit|Paste. The
tabular data is transferred to the other program by the Windows clipboard. The
data is tab-delimited to assist the transfer to a spreadsheet program. The Plot can
also be copied as a bitmap via the Edit|Copy Bitmap menu.
You can save the underlying data in a text file. First, select the desired window to
make it the active window. Second, select File|Save As from the TracePro
menu. The Save As dialog box displays to let you save the file with the default
extension txt. The file is saved in tab-delimited format, suitable for importing into a
spreadsheet program. The plot can also be saved as a Windows bitmap file by
selecting the bmp type from the Save as type list in the File Save As dialog box.

Ensquared Flux
TracePro includes the capability to select a rectangular area of the Irradiance Map
and view the ensquared flux and to display the rays contained in the selected
region. Display Selected Rays must be selected before selecting a region. To

TracePro 2022 User’s Manual 6.15


Analysis

select a region in the map, Hold down the SHIFT key, then left-click and drag on
the Irradiance Map to select the “ensquared” area.

Region Selection and Cursor Ensquared Flux and Area

FIGURE 6.9 - Irradiance Region and Ensquared Flux

The flux and area are displayed in the status bar of the main TracePro window.

Display Selected Rays


To activate the “ensquared flux and rays” feature, select the Analysis Menu and
check Display Selected Rays. When you view both the Irradiance Map and the
Model Window you will see the rays contained in the selected region. The ray
display updates after the selection is made.

6.16 TracePro 2022User’s Manual


Analysis Menu

FIGURE 6.10 - Rays displayed for a selected Irradiance Map region.

Select Rays Dialog


You can also enter the selected region manually through the Select Rays Dialog.
Open the dialog by selecting Analysis|Select Rays.... Enter the new region
corners and press the Set button to update the selection and show the new flux
and area.

TracePro 2022 User’s Manual 6.17


Analysis

FIGURE 6.11 - Select Rays Dialog.

Luminance/Radiance Maps
After a Luminance map is traced as described in “Luminance/Radiance Ray
Tracing” on page 5.38, the map is displayed from the Luminance Dialog. Display
settings can be changed by right-clicking on the plot or by selecting
Analysis|Luminance/Radiance Map Options from the TracePro main menu,
then selecting the name of the map in the dialog box. The Options dialog is shown
in Figure 6.12.

FIGURE 6.12 - Luminance Map Options dialog.

Color scheme
Selecting the True Color color scheme results in a true color or photorealistic
rendering based on the wavelengths traced in the model. The more wavelengths

6.18 TracePro 2022User’s Manual


Analysis Menu

traced, the more accurate the rendering will be. If you trace just one wavelength,
the rendering will appear illuminated in the color corresponding to that
wavelength. No luminance/radiance units are displayed for a True Color map.
For any other Color Scheme selection, the colors in the map are as specified in
the Color Scheme, with colors corresponding to luminance or radiance values.

Units
When you move the mouse over the map, the luminance/radiance value at the
position of the mouse cursor is shown in the status bar.
• When Photometric Units are selected in the Raytrace Options dialog box, the
Units selections available in the Luminance Map Options dialog box are cd/
m2(nit), footlambert, or millilambert.
• When Radiometric Units are selected, the only units available for the Radiance
Map Options are W/m2.
An example plot is displayed in Figure 6.14. This example is further expanded
upon, especially the usefulness of Auto importance sampling, in “Example Using
Luminance/Radiance Maps” on page 9.65

True color options


When the Color scheme is set to True color, the True color options appear below
the other settings, as shown in Figure 6.13. Here you can control the Brightness,
Contrast, and Gamma using values from 0 to 1 for Brightness and Contrast and
from 0-3 for Gamma.

FIGURE 6.13 - Luminance Map Options dialog with Color scheme set to True
color.

Normalize to: has 3 options: None, Highest Color, and Exposure Level. Selecting
Highest Color will normalize the displayed color value in the plot. Selecting
Exposure Level will normalize the plot to display a saturated white color, even is

TracePro 2022 User’s Manual 6.19


Analysis

the plot is monochromatic. For example, with green light the saturated values
would be (0,255,0).
Saturated Color allows you to turn the Saturated Color on or off. The RGB values
can range from 0-255. Saturated Color shows any pixels where any of the RGB
values are 255. You can change the color for saturated pixels by clicking on the
color bar.
Value mode has two options, Raw value and Integer. This setting controls the
values displayed in the Status Bar when you move the mouse pointer over the
map or rendering. The Raw value displays the floating-point RGB values in the
Status Bar as calculated by TracePro to create the True Color image. When
Integer is selected, the actual integer values used in the image (0-255 RGB) are
displayed.
If Normalize to: is set to Exposure value and the Calculate exposure
compensation box is checked, the Exposure compensation value for saturated
white will be calculated automatically. If the Calculate exposure compensation box
is not checked, an Exposure compensation value can be manually entered.

FIGURE 6.14 - Luminance plot in Grayscale.

6.20 TracePro 2022User’s Manual


Analysis Menu

3D Irradiance/Illuminance
3D Irradiance/Illuminance maps the incident or absorbed irradiance/illuminance
on to the selected surfaces and/or objects. The color legend shows the irradiance
over the surface. Each object and surface selected will be displayed.

FIGURE 6.15 - 3D Irradiance/Illuminance displayed in Model Window on the


surface of a sphere, with True Color option and edges of triangular
pixels drawn.

3D Irradiance/Illuminance Options
The 3D Irradiance/Illuminance Options dialog box is accessed from the Analysis
menu or by right-clicking on the Model Window when 3D Irradiance/Illuminance is
turned on. The Options dialog provides the following parameters to control the
irradiance/illuminance display.

TracePro 2022 User’s Manual 6.21


Analysis

FIGURE 6.16 - 3D Irradiance/Illuminance Options dialog box.

Map Data
The Map Data defines what quantities are displayed in the plot.

Quantities to Plot
Selects the map type to display. You can choose from:
• Irradiance/Illuminance, a plot of flux per unit area of radiation incident on or
absorbed by a surface,
• CIE (x, y), a plot of color in CIE xy coordinates,
• CIE (u’,v’), a plot of color in CIE u’v’ coordinates,
• True Color
When you display either a CIE xy or u’v’ plot, a plot of the color of the light incident
on the surface is displayed, at full brightness.

Rays to Plot
You can display a map of absorbed, incident, or exiting rays. Incident irradiance
maps can be misleading when the selected surface is hit several times by the
same ray. For example, a surface between two infinite parallel mirrors would have
the same ray intersect the surface until the ray fell below the flux threshold or
intercept threshold generating an incident flux many times greater that the starting
flux of the ray. Exiting-ray irradiance maps can also be misleading for the same
reason. In addition, take care that you do not interpret an exiting-ray irradiance

6.22 TracePro 2022User’s Manual


Analysis Menu

map as the appearance of the surface. To display the appearance of surfaces,


use the Luminance Map.

Normalize to
Normalize the map data according to the selection. The choices are None,
Average emitted irradiance, Peak irradiance. The default selection is for no
normalization, i.e. actual irradiance (W/m2) or illuminance (lux) values.
If Quantities to Plot is set to True Color, the Normalize to: options change to None,
Highest Color, and Exposure Level. Selecting Highest Color will normalize the
displayed color value in the plot. Selecting Exposure Level will normalize the plot
to display a saturated white color, even is the plot is monochromatic. For example,
with green light the saturated values would be (0,255,0).

Set Max/Min
The Max/Min values provide thresholds for the plot scale. If a Max value is set it
will be used for the maximum value used in the Irradiance/Illuminance plot. Any
values which exceed the Max value will be displayed at the Max value. The Min
value works in the same manner. If the Log Scale is set the Min value is disabled.

Display Options
The display options control the plot output.

Smoothing
If the smoothing box is checked, the irradiance distribution will be smoothed.

Contour Plot
Selecting Contour Plot creates a topographic map of the irradiance/illuminance.
Smoothing is always turned on when you select Contour Plot. The number of
contours and contour levels is described in the Contour Levels section below.

Pixel Edges
The edges of the triangular pixels will be displayed to help visualize the surface.

Gradient Display
Checking this box causes a continuous gradation of colors to be displayed instead
of discrete contours.

Log Scale
Checking this box displays the irradiance on a logarithmic scale. This is especially
useful when you need to see details in the very lowest irradiance values. This
might be needed, for example, in a stray light analysis.

Lighting On
Turn on ambient lighting to help in visualizing the shape of the surface(s) on which
the irradiance/illuminance is displayed.

No. of Pixels
The No. of Pixels value determines the resolution of the display on the irradiance
map. The value is used to calculate the maximum edge length of the trangular

TracePro 2022 User’s Manual 6.23


Analysis

pixels. The maximum edge length is set to the diagonal of the largest box
enclosing any selected surface, divided by the No. of Pixels. The shape of the
boundary of the surface or the local curvature of the surface may require a smaller
edge length, so some pixels may be smaller.

Color Map
Use this drop-down list to opt for either grayscale or one of several color-coded
schemes. The choice of color affects both the display and the contour map
display.

Contour Levels
This controls how contours are displayed for Contour plots.

Auto levels
The Auto levels check box controls the contour levels in the contour plot.
If the Auto levels check box is checked, TracePro divides the display of intensity
values evenly into the number of levels defined in the Number entry in the Levels
part of the dialog box. Select the Apply button to update the levels with the new
values from the dialog box. The legend is updated as well.
If Auto levels is not checked, TracePro uses the levels defined in the list box on
the right hand side of the Levels section of the dialog box. You can customize the
levels by moving numbers in and out of the box. Move numbers from the Selection
box into the list by pressing the --> button, and out (to remove them from the list)
by pressing the <-- button.
You can use Auto levels for a desired number of contours and TracePro will
equally space the number over the flux or candela range plotted.

Selection
When the Auto levels box is unchecked, TracePro uses the levels defined in the
list box on the right hand side of the Levels section of the dialog box. You can
customize the levels by moving numbers in and out of the box. Move numbers
from the Selection box into the list by entering a value and pressing the -->
button, and out (to remove them from the list) by selecting the value from the list
and pressing the <-- button.
You can use Auto levels for a desired number of contours and TracePro will
equally space the number of values over range plotted. Values can then be added
or removed from this list.

Number
If the Contour Plot box is checked, this controls the number of contour levels that
are displayed in the contour plot.

Use percent of Max.


This option lets you enter a percent (from 0.0 – 1.0) of the maximum plot value.
TracePro calculates and sets levels for each value entered.

6.24 TracePro 2022User’s Manual


Analysis Menu

True color options


When Quantities to plot is set to True color, the Contour Levels box changes to
True color options. This allows you to set the Brightness and Contrast on a scale
of 0 to 1 and Gamma on a scale of 0 to 3 as shown in Figure 6.17.

FIGURE 6.17 - True color options settings appear in place of Contour Levels
when Quantities to plot is set to True color.

Saturated Color allows you to turn the Saturated Color on or off. The RGB values
can range from 0-255. Saturated Color shows any pixels where any of the RGB
values are 255. You can change the color for saturated pixels by clicking on the
color bar.
Value mode has two options, Raw value and Integer. This setting controls the
values displayed in the Status Bar when you move the mouse pointer over the
map or rendering. The Raw value displays the floating-point RGB values in the
Status Bar as calculated by TracePro to create the True Color image. When
Integer is selected, the actual integer values used in the image (0-255 RGB) are
displayed.
If Normalize to: is set to Exposure value and the Calculate exposure
compensation box is checked, the Exposure compensation value for saturated
white will be calculated automatically. If the Calculate exposure compensation box
is not checked, an Exposure compensation value can be manually entered.

Apply
Updates the plot.

Set Defaults
The options are saved when the Model is saved to disk in an OML file. After the
data is changed, pressing the Set Defaults button will store the data into the
TracePro defaults file to be used the next time TracePro is opened. See “User
Defaults” on page 1.11.

TracePro 2022 User’s Manual 6.25


Analysis

Candela Plots
Candela plots can be viewed by first selecting Analysis|Candela Plots and
next selecting Polar Iso-Candela, Rectangular Iso-Candela, Polar Candela
Distribution or Rectangular Candela Distribution.

FIGURE 6.18 - Polar Iso Candela Contours (left) Candela Distribution in


Luminaire Format (right)

A candela plot is a plot of luminous intensity, or flux per solid angle. In photometric
units, a luminous intensity plot is in units of candelas (lumens per steradian). In
radiometric units, an intensity plot is in units of watts per steradian. Candela plots
are commonly used in the design of illumination systems, especially those used in
the far field.
Candela data can be collected from ray sets of Missed rays, rays Exiting a surface
or rays Incident on a surface. Missed rays are a collection of all rays that “leave”
the model and “go off to infinity.” Exiting rays are the collection of ray segments
following the intersection point of a ray at a surface. Due to ray splitting, several
ray segments may contribute to the candela data for each incident ray. Incident
rays are the collection of ray segments which intersect the selected surface. No
surface selection is required for Missed rays but one is necessary for Exiting and
Incident rays.
The candela plots represent flux versus angle and can be smoothed using the
Candela Options dialog box. The iso-candela plots can be presented as false
color maps or contour plots. The distribution plots are graphs of cross-sectional
curves through the candela distribution.
The orientation of the candela plots is determined by the Normal Vector and the
Up Vector, as specified in the Analysis|Candela Options dialog box. The
normal vector specifies the axis of the candela plot and the up vector specifies
“which way is up.”

6.26 TracePro 2022User’s Manual


Analysis Menu

Candela Options
Candela map options are controlled through the Candela Options dialog box,
accessed by selecting Analysis|Candela Options or by right-clicking on the
candela plot. The dialog box is divided into tabbed tabs:
• Orientation and Rays
• Polar Iso-Candela
• Rectangular Iso-Candela
• Candela Distributions

FIGURE 6.19 - Candela Options dialog with the Orientation and Rays tab
displayed.

The Orientation and Rays options section is used for all Candela plots. Each
option and its function are described in the sections that follow.

Set Defaults
The options are saved when the Model is saved to disk in an OML file. After the
data is changed, pressing the Set Defaults button will store the data into the
TracePro defaults file to be used the next time TracePro is opened. See “User
Defaults” on page 1.11.

TracePro 2022 User’s Manual 6.27


Analysis

Orientation and Rays


Normal Vector
The Normal Vector is a vector in 3D space that is used to orient the polar axis in
candela plots. The center of the candela/intensity plots is based on that direction.
On the map, the normal vector is pointing away from you and toward the candela
plot. It as though are looking along the vector that is pointing to the center of the
distribution, and the standard is to look along the direction of light propagation. For
example, if you are designing an illuminator that projects light to the right, i.e.,
along the +z axis, then you probably want the Normal Vector to be X=0, Y=0, Z=1.

Up Vector
The Up Vector is a vector in 3D space that is used to orient the direction that is
“up” in the candela plots. The orientation is defined so that the Up Vector points
up, i.e. toward the top of the screen in the candela plots. For example, if you are
designing an illuminator that projects light to the right as in the example described
in the previous paragraph, i.e., along the +z axis, then you probably want the
Normal Vector to be X=0, Y=0, Z=1. Since the y axis normally points up in
TracePro, you probably want the Up Vector to be X=0, Y=1, Z=0 for this example.
If you want to see what that distribution would look like if you were standing on
your head, set the Up Vector to X=0, Y=-1, Z=0.

Candela Plot Orientation Example


For example, if you are designing an illuminator that projects light to the right, i.e.,
along the +z axis, then you probably want the Normal Vector to be X=0, Y=0, Z=1.
Since the y axis normally points up in TracePro, you probably want the Up Vector
to be X=0, Y=1, Z=0 for this example. If you are designing a light fixture that points
down, then you want the normal vector to be X=0, Y=-1, Z=0 and the Up Vector to
be either X=1, Y=0, Z=0 or X=0, Y=0, Z=1. Figure 6.20 shows two hemispheres
that correspond to the Normal and Up vectors defined in this example. The picture
on the left has a Normal of (0,0,1) and the picture on the right has a normal of (0,-
1,0). The Normal and Up vectors reference the global origin displayed in Figure
6.20.

FIGURE 6.20 - Candela hemispheres for left) Normal vector (0,-1,0), Up


vector (0,0,1) and right) Normal vector (0,0,1), Up vector (0,1,0)

6.28 TracePro 2022User’s Manual


Analysis Menu

Ray Selection
Ray Selection lets you choose which rays to use as Candela Data. You can select
either:
• Missed rays - all rays that continue beyond all objects in the Model.
• Exiting rays from selected surface (Analysis Mode only) - rays that leave the
selected surface (Not available for a Simulation Mode ray trace)
• Incident rays from selected surface or Exit Surface - rays that intercept the
selected surface

Data Processing | Symmetry


Using this option, you can take advantage of known symmetry on a Candela plot.
A smoother distribution can be obtained from fewer rays. The five symmetry
selections are:
• None - This is the default where no symmetry is applied.
• Left / Right - Symmetry is applied between the left and right halves of the plot.
• Up / Down - Symmetry is applied between the upper and lower halves of the
plot.
• Quadrant - This is the combination of Left / Right and Up / Down symmetry.
• Rotational - Symmetry is applied about an axis perpendicular to the center of
the plot.
The symmetry selection should be used with caution. TracePro will force
symmetry onto the Candela plot even if your model does not possess symmetry.
The user, through this option, conveys to TracePro that the data being plotted
actually has the selected symmetry.

Polar Iso-Candela
A Polar Iso-Candela Plot shows spherical polar angle on the polar axis. It shows a
spherical azimuth angle in the azimuth direction. This plot maps a hemisphere
onto a plane. The distribution plots display curves in either rectangular or polar
format.

TracePro 2022 User’s Manual 6.29


Analysis

FIGURE 6.21 - Candela Options dialog with the Polar Iso-Candela tab
displayed.

Smoothing
If the smoothing box is checked, the intensity distribution will be smoothed using a
Gaussian smoothing kernel of the form

2 2 2
1 –  +  y    2 
K   x  y  = ------------2- e x , (6.3)
2 
where  is the waist radius of the Gaussian. The number to the right of the
Smoothing check box is used as the waist radius. For example, a value of 20
means that the waist radius of the kernel is 1/20 of the width of the map.
The smoothing is done by convolving this kernel with the candela or intensity
distribution,

E smooth   x  y  =   E  x' y' K  x – x' y – y'  dx' dy' , (6.4)

The convolution is done by Fourier transforming, applying a filter, and inverse


Fourier transforming.

6.30 TracePro 2022User’s Manual


Analysis Menu

Contour Plot
If the Contour Plot box is checked, the Polar Iso-Candela data is displayed as a
contour plot. The number of levels displayed is determined by the Number entry in
the Levels part of the Polar Plots section of the dialog box.

Angular width
The Polar Iso-Candela plot is displayed over a subset of a hemisphere of the
entered angular width. The angle is entered in degrees.

Set Max/Min
Sets the Max or Min value to plot. If the item is enabled, the value entered in the
edit box will be used when the plot is updated.

Log Plot
Checking this box displays the data on a logarithmic scale. This is especially
useful when you need to see details in the very lowest data values. This might be
needed, for example, in a stray light analysis.

Color Map
Use this drop-down list to choose either grayscale or one of several color-coded
schemes. The choice of color affects both the display and the contour map display
on the Iso-Candela Plot as well as the distribution plots.

Auto levels
The Auto levels check box controls the contour levels in the Polar Iso-Candela
plot. If the Auto levels box is checked, TracePro divides the display of intensity
values evenly into the number of levels defined in the Number entry in the Levels
part of the dialog box. When you click the Apply button, the plot is updated with
the new levels.

Selection
If Auto levels is not checked, TracePro uses the levels defined in the list box on
the right hand side of the Levels section of the dialog box. You can customize the
levels by moving numbers in and out of the box. Move numbers from the Selection
box into the list by clicking the --> button, and out (to remove them from the list)
by clicking the <-- button.
You can use Auto levels for a desired number of contours and TracePro will
equally space the number over the flux or candela range plotted.

Number
This entry controls the number of Auto levels displayed either in the color-coded
intensity or contour Polar Iso-Candela plot.

Text File Format


A text file saved from a polar iso-candela plot starts with header information, e.g.

TracePro Release: [major release no] [minor release no] [dot release no]
Polar Iso-Candela Data for [path and file name of TracePro file]

TracePro 2022 User’s Manual 6.31


Analysis

Data covers +/- 90.000 degrees from Normal


Data for Missed Rays
Data generated at 09:55:10 June 15, 2012

This is followed by the raw data for the candela map. The data items are candela
values or intensity values (W/sr) evaluated in a 128x128 grid. The actual data lies
in a circular region superimposed on the grid. The pole on the grid is halfway
between the 64th and 65th row and the 64th and 65th column. Therefore the data
for a given entry in the table corresponds to polar (θ) and azimuth (ϕ) angles as
follows:

θij = (θmax/64) [(i-64.5)2+(64.5-j)2]1/2

ϕij = atan2(64.5-i, 64.5-j)

where

θmax is the angular width of the plot as entered in the Candela Options dialog box,
Polar Iso-Candela tab (and in the file header),

i=column number (1 – 128, left to right)

j=row number (1 – 128, top to bottom)

and atan2 is the arctangent function taking arguments as

atan2(y, x)

Rectangular Iso-Candela
A Rectangular Plot shows the intensity or candela distribution as a function of
vertical and horizontal angles. This is in contrast to the Polar Plot, in which the
pole of the polar coordinates is in the center of the plot. For the Rectangular Plot,
the equator is in the center of the plot, so that the angles are vertical and
horizontal angles. A square angular region is displayed on the plot. The size of the
region can be controlled in this area of the dialog box.

6.32 TracePro 2022User’s Manual


Analysis Menu

FIGURE 6.22 - Candela Options dialog with the Rectangular Iso-Candela tab
displayed.

Height and Width


These entries control the size of the angular region that is plotted. The dimensions
are in degrees. The center of the plot is along the direction of the Normal Vector.
The top of the plot is along the direction of the Up Vector.

Angle Convention
The Angle convention defines the method used to display the rectangular plot.
Selecting Orthogonal angles displays the angular data projected onto the x-z and
y-z orthogonal planes. Type A and Type B goniometers use the angle conventions
outlined in the Lighting Handbook, published by the Illuminating Engineering
Society of North America (IESNA).

Profiles
Display an XY plot in the same window with data slices based on the mouse
cursor position.

3D Plot
This option produces a 3D relief plot using OpenGL.

TracePro 2022 User’s Manual 6.33


Analysis

Candela Distributions
The Candela Distribution plots are defined as slices of the sphere containing the
emitting source. The number of slices and resolution can be defined by the user.

FIGURE 6.23 - Candela Options dialog with the Candela Distributions tab
displayed.

Smoothing
This option determines whether smoothing is performed on the data slices. If
enabled, the number in the smoothing box is used as a smoothing factor. If
smoothing is off, the number sets the number of points about the slices to display
in the plot.

cd/Klm
Scales output to cd per 1000 lumens. This is a common scale factor for lighting
output.

Number of horizontal angles


Sets the number of horizontal angles to plot. The value set here corresponds to
the horizontal angles in IES (IESNA) format and to C angles in ldt (eulumdat)
format files. See “IESNA and Eulumdat formats” on page 6.35.

6.34 TracePro 2022User’s Manual


Analysis Menu

Luminaire format
When checked, the format of the Polar Candela Distribution plot changes to
conform to the standard Luminaire Design format, with the Normal Vector pointing
down.

Angular width
Sets the angular width of the luminaire display in degrees. The width for polar and
rectangular distributions can be set individually.

Luminaire width
Sets the angular range of the display in degrees when the Luminaire format is
selected.

Set Max/Min
Sets the Max or Min value to plot. If the item is enabled, the value entered in the
edit box will be used when the plot is updated.

Log Plot
Checking this box displays the data on a logarithmic scale. This is especially
useful when you need to see details in the very lowest data values. This might be
needed, for example, in a stray light analysis.

IESNA and Eulumdat formats


Data can be saved to a text file in IESNA (ies) and Eulumdat (ldt) formats. When
saving the data to a text file via File|Save As or right clicking in the display
window and selecting Save As..., the file format is selected with the file
extension drop down box. The IES format is specified in IESNA (Illuminating
Engineering Society of North America) standard LM-63-02. Figure 6.24
summarizes the IESNA conventions for angles used in the IESNA format for Type
C photometry.
180° Vertical


180° 90°

90° 270°
Horizontal Horizontal
Length Angles Angles

180°
270° 0°

Width
0° Vertical
(a) (b)
FIGURE 6.24 - Conventions for vertical and horizontal angles used in
standard IESNA format for Type C photometry; (a) plan view of

TracePro 2022 User’s Manual 6.35


Analysis

luminaire showing length and width in relation to horizontal angles, and


(b) schematic showing vertical and horizontal angles.1

Figure 6.25 shows the dialog that appears when you select Save As. There are
four options for the file types: text (*.txt), IESNA LM-63 (*.ies), Eulumdat (*.ldt),
and bitmap (*.bmp). The text file option saves the data to a text file. The bitmap
option saves a bitmap screen shot of the plot. The IESNA and Eulumdat options
provide a number of options to save the data. The following paragraphs explain
and show these options.

FIGURE 6.25 - Save As dialog for candela plots with IESNA type selected.

When the IESNA format is chosen for Save as type in the File|Save As dialog, a
dialog box opens allowing you to enter inputs appropriate to the IESNA standard,
including the number of lamps, number of angles, and luminous dimensions (see
Figure 6.26). This additional dialog is displayed upon selecting the *.ies option.

1. Reproduced from IESNA LM-63-02 Standard File Format for Electronic transfer of Photometric Data, p.4, © Illuminating
Engineering Society of North America.

6.36 TracePro 2022User’s Manual


Analysis Menu

FIGURE 6.26 - The additional IES File Auxiliary Data dialog for the IESNA
format allows you to enter a number of IESNA-specific parameters.

The various options are:


• Test Lab: for information only.
• Manufacturer: for information only.
• # Lamps: the number of lamps in the measurement. Use the Get from raytrace
sources button to get the number of active sources in the model.
• Absolute Photometry or Relative Photometry: From IESNA LM-63-02:
“Absolute photometry consists of the simultaneous comparison of a standard
lamp and an unknown light source. Relative photometry consists of the evalua-
tion of the photometric characteristic of a lamp by comparison with the
assumed lumen or spectral output of a test lamp.”
• Lumens per lamp: Number of lumens per lamp in the model. The default
value is the sum of the lumen output of all sources in the model divided by the
number of sources. If you select Absolute Photometry (see above) the number
is set to -1 and is not editable.
• Photometric (i.e., type of goniometer): The goniometer type for the data in the
IES file. This entry is not editable and depends on the type of plot from which
you selected Save As and the settings in the Candela Options as follows:
Polar Iso-candela Plot - N/A; Rectangular Iso-candela Plot - Type A
or Type B depending on the Angle convention setting in Candela Options;
Rectangular or Polar Distribution Plot - Type C only.
• Vertical angles: the number of angles to save in the vertical direction.
• Multiplier: the multiplier that should be applied to the data.

TracePro 2022 User’s Manual 6.37


Analysis

• Horizontal angles: the number of angles along the horizontal direction (avail-
able for Type C Rectangular Iso-candela Plot only).
• # decimals: Number of decimal points of precision to use when writing can-
dela values to the file.
• Symmetry, Horizontal angles: This setting is not editable and depends on
the Symmetry setting in Candela Options as follows: None -> 0 - 360; Left/
Right -> 0 - 180; Up/Down -> N/A; Quadrant -> 0 - 90; Rotational -> 0 - 0.
• Vertical angle range: range of vertical angles for output of candela values.
The ranges available depend on the Angle convention setting in Candela
Options.
• Width: the width of the luminous area of the source in the designated units.
• Length: the length of the of the luminous area of the source in the designated
units.
• Height: the height of the luminous area of the source in the designated units.
• Combo box: units for the luminous dimensions of the source, in Feet or in
Meters.
When the Eulumdat format is chosen in the File|Save As dialog, you are
allowed to enter a number of inputs appropriate to the Eulumdat standard,
including the number of lamps, symmetry and luminous dimensions (see Figure
6.27). This additional dialog is displayed upon selecting the *.ldt option.

FIGURE 6.27 - The additional Save As dialog for the Eulumdat format allows
you to enter a number of Eulumdat-specific parameters.

The various options are (the bolded items denote the default values):

6.38 TracePro 2022User’s Manual


Analysis Menu

• Measurement Report Number: the designator given to the report for this file
save, Measurement Report Number,
• Type: the type of source and its symmetry, point source, vertical axis symme-
try; linear luminaire; or point source, any other symmetry (note that only the
linear luminaire option is subdivided into longitudinal and transverse direc-
tions),
• Distance Dg: the distance in degrees between luminous intensities in the C-
plane, 5,
• Luminaire Name: name of the luminaire, Luminaire name,
• Luminaire Number: the luminaire number for quality control, 1,
• Luminaire Tilt: the tilt angle of the luminaire during testing, 0,
• Luminaire Len/Diameter: the length or diameter of the luminaire in mm, 1,
• Luminaire Width: the width of the luminaire in mm, with 0 for circular lumi-
naires, 0,
• Luminaire Height: the height of the luminaire in mm, 1,
• Luminous Area Len/Diameter: the length or diameter of the luminous area in
mm, 1,
• Luminious Area Width:the width of the luminous area in mm, 0,
• C0 Plane: the height of the luminous are C0-Plane in mm, 0,
• C90 Plane: the height of the luminous are C90-Plane in mm, 0,
• C180 Plane: the height of the luminous are C180-Plane in mm, 0,
• C360 Plane: the height of the luminous are C360-Plane in mm, 0,
• Conv. Factor for Luminous: the multiplier for the data to be saved, 1,
• Type of Lamps: the type of lamp(s) in the file, Type of lamp,
• No. of Lamp Sets: the number of lamp sets used for the model, 1,
• No. Lamps: the number of lamps that comprise a set, 1,
• Wattage: the electrical wattage of the system including ballast, 1,
• Color Appearance/Temperature: the color appearance or color temperature of
the model, standard,
• Color Rendering Group/Index: the CRI or CR Group for the model, 1B, and
• Checkbox: checking this box will open this dialog whenever the Eulumdat
(*.ldt) file type is selected. If the box is unchecked, then this dialog will not
automatically open, but it can be manually opened by clicking on the Modify
File Defaults button as shown in Figure 6.25.

Access to Candela/Intensity Data


The results of an intensity calculation can be easily exported from TracePro to
another software package such as a spreadsheet or word processor. Do this by
making the appropriate candela plot window active and selecting Edit|Copy or
pressing Ctrl-C in TracePro. Switch to the other software program, such as
Microsoft Excel, and select Edit|Paste or press Ctrl-V. The tabular data is
transferred to the other program via the Windows clipboard. The plot image can
also be copied as a bitmap via the Edit|Copy Bitmap menu item.
You can also save the underlying data in a text file. First select the desired window
to make it the active window, then select File|Save As from the TracePro menu.

TracePro 2022 User’s Manual 6.39


Analysis

The Save As dialog box displays to save the file with the default extension txt.
The file is saved in tab-delimited format, suitable for importing into a spreadsheet
program. Candela plots can be saved in IESNA LM-63-95 standard format
(*.ies), the Eulumdat (*.ldt) or Windows Bitmap (*.bmp) formats by selecting the
file type in the Save As dialog box.

Enclosed Flux
TracePro includes the capability to select regions within the Polar and
Rectangular Iso-Candela plots to view the Enclosed Flux and optionally to display
the rays contained in the selected region.

Polar Iso-Candela
The polar plot requires use of the Select Rays Dialog. See “Select Rays Dialog”
on page 6.42. By setting the values of the Polar and Azimuth angles circular and
annular regions can be defined as well as circular and annular sections.

FIGURE 6.28 - Selecting a ray region in a Polar Iso-Candela plot.

6.40 TracePro 2022User’s Manual


Analysis Menu

Rectangular Iso-Candela
To select a region in the plot, Hold down the SHIFT key, then left-click and drag on
the plot to select the “ensquared” area.

Region Selection

FIGURE 6.29 - Enclosed Region and Ensquared Flux

The flux and area are displayed in the status bar of the main TracePro window.

Display Selected Paths


This feature enables you to visualize the rays along selected paths. To use the
feature, first select a surface then from the Analysis Menu select Path Sort
Table. Finally select one or more paths, and the ray display will be updated to
show only the rays along the selected paths. If the Irradiance/Illuminance
Map is open, its display will also be updated using only the rays along the selected
paths. For a Simulation Mode raytrace, only one ray representing each path will
be displayed.

TracePro 2022 User’s Manual 6.41


Analysis

Display Selected Rays


This feature allows you to visualize the rays that contribute to a portion of the
Irradiance/Illuminace Map or Isocandela Plot, and is only available after an
Analysis Mode raytrace. To activate this feature, go to the Analysis Menu and
check Display Selected Rays, Then select a region using Analysis|Select
Rays... or graphically select a region on the Irradiance/Illuminance Map or
Rectangular Isocandela Plot. The Model Window will update to display only
those rays in the selected region.
NOTE: The Display Selected Paths feature takes priority over the Display
Selected Rays feature. This means that when the Display Selected Paths feature
is turned on, the Display Selected Rays feature will automatically be turned off
and disabled.

Select Rays Dialog


You can also enter the selected region manually through the Select Rays Dialog.
This is a requirement for Polar Iso-Candela plots. Open the dialog from the
Analysis|Select Rays... menu. Enter the new region corners and press the
Set button to update the selection and show the new flux and area.

FIGURE 6.30 - Select Rays Dialogs for Polar (L) and Rectangular (R) Iso-
Candela Plots.

Polarization Maps Standard Expert

This command maps the polarization ellipse for the incident flux on to the selected
surface. The color level shows the degree of polarization at the point on the
surface. The polarization maps in Figure 6.31 show the input and output faces of a
quarter-wave plate. The object is illuminated using a ray grid with 45 degree linear
polarization.

6.42 TracePro 2022User’s Manual


Analysis Menu

FIGURE 6.31 - Polarization Maps

Note: Polarization must be enabled from the Analysis|Raytrace Options


dialog, Options tab.

Polarization Options
The following options are available for the polarization plots and accessed from
the dialog shown in Figure 6.32.

TracePro 2022 User’s Manual 6.43


Analysis

FIGURE 6.32 - Polarization Options dialog.

Rays to Plot
You can observe a map of either absorbed or incident rays.

Deg of Pol Range


Sets the maximum and minimum range for which the degree of polarization is to
be plotted.

Map Count
Sets the resolution of the map. The selected surface is divided into Map Count by
Map Count regions or “Flux buckets” for the horizontal and vertical axes. The rays
are sorted into the buckets and the polarization is summed. The resulting
polarization direction is displayed for each bucket in the plot.

Color Map
Selects the color palette for the plot. Grayscale and color palettes are available.

Automatic calculation
Enable automatic calculation of the Normal and Up vectors. See “Normal and Up
Vectors” on page 5.14.

6.44 TracePro 2022User’s Manual


Analysis Menu

Normal Vector
Defines the normal to the plane of the polarization map. Non-planar surfaces will
be projected onto a plane for polarization maps. For more information, See
“Normal and Up Vectors” on page 5.14.

Up Vector
Defines the up vector to the plane of the polarization map. The up vector defines
the “vertical axis” of the displayed map. Non-planar surfaces will be projected onto
a plane for polarization map. See “Normal and Up Vectors” on page 5.14.

Apply
Update the map options and display the new polarization map.

Set Defaults
The options are saved when the Model is written to disk in an OML file. After the
data is changed, pressing the Set Defaults button with stored the data into the
TracePro defaults files to be used the next time TracePro is opened. See “User
Defaults” on page 1.11.

Save Polarization Data


Data from a polarization map can be saved to a text file via the File|Save As
menu. The data is comprised of a short header and the four values from the
Stokes vector at each map cell. Each Stokes vector is contained between a set of
parentheses.
The following output shows a portion of the data with four data rows with only one
of the data columns visible.
TracePro Release: 3 2 0
Polarization Map Data for

Data for Object 5 Surface 5


Data generated at 11:37:54 March 19, 2004

(0.81661021,-0.14907119,-0.09443592,0.00000000) (......)
(0.81877151,-0.16808156,-0.04879953,0.00000000) (......)
(0.81948364,-0.17453937,-0.00000000,0.00000000) (......)
(0.81877151,-0.16808156,0.04879953,0.00000000) (......)

OPL/Time-of-flight plot
This command creates a plot of flux incident or absorbed at the selected surface
per unit of optical path length (OPL) or time of flight. The OPL is the total optical
path along each ray from the source to selected surface. Likewise, the time of
flight is the total time it takes for light to propagate along the ray path from the
source to the selected surface. The OPL and time of flight in a homogeneous,
isotropic material are related to each other by the speed of light,
OPL = ct,
where c is the speed of light in vacuum and t is the time of flight. An example OPL/
time-of-flight plot is shown in Figure 6.33.

TracePro 2022 User’s Manual 6.45


Analysis

FIGURE 6.33 - OPL/time-of-flight plot.

OPL/Time-of-flight plot options


You can change the OPL/time-of-flight plot using the OPL/time-of-flight Plot
Options dialog box, as shown in Figure 6.34. Select Analysis|OPL/Time-of-flight
Plot Options, or right-click on the OPL/Time-of-flight plot and select the OPL/Time-
of-flight Options to open the dialog box.
To aid in setting the Min Length and Max Length (or Min Time and Max Time) to
values that are meaningful for your model, you can use the Ray History Table on
the surface of interest. (See “Ray Histories” on page 6.55.) Look at several rays
and notice the value of the OPL at the selected surface (the bottom row in each
table) to judge the range of OPL values that are of interest for the current surface.
Some of the settings in the Options dialog are redundant, i.e. they depend on
other settings. The length and time entries (Min, Max, and Increment) depend on
each other through the relation OPL = ct. For example, if you change the Min
Length setting, the Min Time setting will automatically change per this relation.
Also, the Max, Increment, and # of Increments settings are interdependent. If you
change the # of Increments value, the Max Length and Max Time settings will
change. Conversely, when you change the Max Length or Max Time, the # of
Increments will automatically change. Finally, when you change the Length
Increment or Time Increment, the # of Increments value will change.

6.46 TracePro 2022User’s Manual


Analysis Menu

FIGURE 6.34 - OPL/time-of-flight plot options dialog box.

Plot Flux Versus


You can plot flux versus OPL or time of flight

Rays to Plot
You can plot absorbed or incident rays

Normalization
You can choose to display the flux unnormalized (raw) or normalized to emitted
flux, incident flux, or absorbed flux.

Log Scale
You can display the flux axis with logarithmic spacing of flux values.

Smoothing
You can smooth the curve of flux versus OPL/time-of-flight.

Smoothing factor
The smoothing factor determines how much smoothing occurs when smoothing is
selected. The curve will be smoothed with a blur width that is inversely

TracePro 2022 User’s Manual 6.47


Analysis

proportional to this number. For example, if a factor of 10 is used, the blur width is
1/10 of the length of the horizontal (OPL or time) axis.

Length Units
If Flux versus OPL is selected, this setting determines the units on the horizontal
axis of the plot.

Min Length
If Flux versus OPL is selected, this setting determines the minimum value on the
horizontal axis of the plot.

Max Length
If Flux versus OPL is selected, this setting determines the maximum value on the
horizontal axis of the plot. This setting is affected by the # of Increments setting.

Length increment
If Flux versus OPL is selected, this setting determines the length increment for
binning the flux versus optical path length.

# of Increments
The number of OPL or time increments that are used to collect the flux, i.e. the bin
size. This setting is affected by the Max Length and Max Time settings.

Time Units
If Flux versus time of flight is selected, this setting determines the units on the
horizontal axis of the plot.

Min Time
If Flux versus time of flight is selected, this setting determines the minimum value
on the horizontal axis of the plot.

Max Time
If Flux versus time of flight is selected, this setting determines the maximum value
on the horizontal axis of the plot. This setting is affected by the # of Increments
setting.

Time Increment
If Flux versus time of flight is selected, this setting determines the time increment
for binning the flux versus time of flight.
Save OPL/Time-of-flight plot
Data from an OPL/Time-of-flight map can be saved to a text file via the File|Save
As menu. The data is comprised of a header and a two-column table with the
values of flux versus OPL or time of flight.
The output below shows a portion of the data with four data rows with only one of
the data columns visible.
Finally, you can also save plot image as a bitmap. To do this, select File|Save
As and choose Files of type: bitmap.
TracePro Release: 5 0 0

6.48 TracePro 2022User’s Manual


Analysis Menu

Flux vs Optical Path Length Data for


E:\TraceProData\testdata\Flux_v_OPL\Flux_vs_OPL.OML
Data for Absorbed rays from Sphere 1 Surface 0
Data generated at 14:30:53 January 06, 2009

Normalization:Raw
Smooth:Off
Smooth Factor:10
Log Scale:Off
Length Units:Millimeters
Time Units:Seconds
Max Length:40
Min Length:10
Length Increment:1
Max Time:1.33426e-010
Min Time:3.33564e-011
Time Increment:3.33564e-012
Number of Increments:30

OPL Flux
10.5 0
11.5 0
12.5 0
13.5 0
14.5 0
15.5 0
16.5 0
17.5 0
18.5 0
19.5 0
20.5 0.143911
21.5 0.166052
22.5 0.129151
23.5 0.121771
24.5 0.0811808
25.5 0.0922509
26.5 0.0590406
27.5 0.0627306
28.5 0.0516605
29.5 0.0295203

Incident Ray Table


The Incident Ray Table shows data for rays incident on the selected surface. The
table can be scrolled, printed, copied to the Windows clipboard for pasting into
another application, or saved to a file. The saved file can also be formatted as a
TracePro ray file for making a File Source.
An incident ray table can be viewed for any surface in the model. To view an
incident ray table:
• choose the Edit|Select Surface menu item or press the Select Surface
toolbar button,
• select the surface for which you want to see the incident ray table,
• choose Analysis|Incident Ray Table.

TracePro 2022 User’s Manual 6.49


Analysis

A new window, Figure 6.35, opens with a table rays incident on the surface. To
view the incident ray table for another surface, select that surface with the mouse
and the ray table will automatically update to show the rays at that surface.

FIGURE 6.35 - Incident Ray Table.

The incident ray table displays the columns shown in Table 6.5.
At each ray intersection a Intercept Type is stored in the ray node. The ray types
are listed in Table 6.3.

6.50 TracePro 2022User’s Manual


Analysis Menu

TABLE 6.3. Ray Intercept Types.

Label Description
SpecTran Specular Transmission
SpecRef Specular Reflection
RandTran Random Transmission (e.g. Scatter, Dif-
fraction, etc.)
RandRefl Random Reflection (e.g. Scatter, Dif-
fraction, etc.)
ImpTran Importance Transmission (from Impor-
tance Sampling)
ImpRefl Importance Reflection (from Impor-
tance Sampling)
RanDiffTran Diffraction in Transmission
RanDiffRefl Diffraction in Reflection
ImpDiffTran Diffraction in Transmission (from Impor-
tance Sampling)
ImpDiffRefl Diffraction in Reflection (from Importance
Sampling)
RanVolume Node in bulk scattering object.
ImpVolume Node in bulk scattering object (from Impor-
tance Sampling)
GrinTran Node inside a Grin Object
RepTileTran Node inside a RepTile surface
TIR Total Internal Reflectance

Additional information is stored for certain conditions and displayed under the
History column. These are shown in Table 6.4.
TABLE 6.4. Ray History Types.

Label Description
OpticalScat Optical Scatter threshold reached
RandomScat Random Scatter threshold reached
TotalIcepts Total Intercept threshold reached
TotalScat Total Scatter threshold reached
Emitted Starting node at emitted surface
Edge Hit Ray failed at an edge
Coinc Surf Ray intersected two coincident surfaces
TIR Ray reflected due to TIR
Missed Ray missed all surface
Volume Scat Ray in a bulk scattering object
RepTile Ray in a RepTile surface

An algorithm is used to determine if a ray intersected two coincident surfaces, by


first calculating how far apart the two intersection points are, then comparing to a

TracePro 2022 User’s Manual 6.51


Analysis

tolerance. The tolerance varies depending on the particular intersection, but the
smallest tolerance value is 1.0e-6 mm (1 nm).
Each sheet in the Incident Ray Table displays the columns listed in Table 6.5 with
additional columns for polarization data if polarization raytrace in enabled.
TABLE 6.5. Incident Ray Table Columns

Polarization
Label Description Ray Trace
Ray Number The row in the table
Wavelength The wavelength for the current ray
Source The name of the source from which this ray started
Start Ray For example, Start Ray 3 is the third ray started in the raytrace.
Ray Node The ray starts with ray node 1 (at the source or grid) and the
first ray-surface intersection is node 2, etc.
Type The type of the previous ray node, for example, SpecRefl for
specular reflection.
History Often blank. Any special type of the previous node, for exam-
ple, TIR for total internal reflection—a totally internally
reflected ray on the previous node is Type=SpecRefl and His-
tory=TIR.
Flux Flux of the incident ray.
X Pos., Y Pos., X, Y, and Z coordinates where the ray struck the surface.
Z Pos.
X Vec., Y Vec., Z X, Y, and Z direction cosines of the ray incident on the surface.
Vec.
S0, S1, S2, S3 Components of the Stokes vector in the local coordinate sys- enabled
tem of the ray.
Deg Pol Degree of polarization of the ray. enabled
Ellipse Ratio Ratio between the two axes of the polarization ellipse. enabled
Xvec MajAxis, X, Y, and Z components of a vector pointing in the direction of enabled
Yvec MajAxis, the major axis of the polarization ellipse.
Zvec MajAxis

Copying and Pasting the Incident Ray Table Data


The incident ray table data can be exported from TracePro to another software
package such as a spreadsheet or word processor. Do this by making the incident
ray table window the active window and selecting Edit|Copy in TracePro (or Ctrl-
C). Go to the other software program, such as Microsoft Excel, and select
Edit|Paste (or Ctrl-V). The tabular data is transferred to the other program via
the Windows clipboard.

Saving the Incident Ray Table in a File


You can also save the incident ray table in a text file. Then you can import the
table into a spreadsheet program, for example, or perform post-processing
operations using your own or other analysis software. To do this, first be sure the
incident ray table is activated (as indicated by a colored top bar on the Incident
Ray Table window), then select File|Save As. The default extension for the file is

6.52 TracePro 2022User’s Manual


Analysis Menu

txt. Type the file name you wish to use and press OK. TracePro saves a tab-
delimited file containing the incident ray table.
When you save the incident ray table to a file, additional data columns are saved
to the file as shown in Table 6.6. The wavelengths are displayed as head lines.
TABLE 6.6. Incident Ray Table Columns: These columns are available when the
table is saved to a format outside of TracePro for post-processing.

Ray Number The row in the table


Start Number For example, start Number 3 is the third ray started in the ray-
trace.
Split Number The ray starts with split number 1 (at the source or grid) and the
first ray-surface intersection is split number 2, etc.
Type This refers to the type of the ray node, e.g. SpecRefl for specu-
lar reflection.
Hist This is often blank. It refers to any special type of the previous
node, e.g. TIR for total internal reflection. Thus a totally inter-
nally reflected ray on the previous node would result in
Type=SpecRefl and Hist=TIR.
Inc Flux Flux of the ray incident on the surface in Watts or Lumens.
Abso Flux The portion of the incident flux of the ray that was absorbed by
the surface in Watts or Lumens.
X Pos., Y Pos.,  The global coordinates where the ray struck the surface.
Z Pos.
X Vec., Y Vec.,  The global direction cosines of the incident ray.
Z Vec.
X Norm, Y Norm,  The normal to the surface at the position where the ray struck
Z Norm the surface.
S0, S1, S2, S3 The Stokes vector of the incident ray (polarization only).
DegOfPol The degree of polarization of the incident ray (polarization only)
Ellipse Ratio Ratio between the two axes of the polarization ellipse
Xvec MajAxis,  X, Y, and Z coordinates of a vector pointing in the direction of
Yvec MajAxis, Zvec the major axis of the polarization ellipse.
MajAxis

Saving the Incident Ray Table as a Ray File


A TracePro ray file can be created from an Incident Ray Table, for use in defining
a File Source. With the Incident Ray Table as the active window, select
File|Save As, choose the file format as *.txt, and check the box for “Export to
Ray File format. The ray file saved from the Incident Ray Table will always be
saved as Radiometric units. If TracePro is set to Photometric units, the data will be
converted to Radiometric units when it is saved as a ray file. For more information
on ray files and their applications, see the section titled >“File Sources” on
page 5.22.

Display Selected Rays


The menu command Analysis|Display Selected Rays causes TracePro to
turn off the regular ray display and draw the rays selected by row in the Incident
Rays Table. One or more rows can be selected using the mouse with the <Shift>
or <Ctrl> key. To select a set of continuous rows, click in the first row and then,

TracePro 2022 User’s Manual 6.53


Analysis

with the <Shift> key pressed, click in the last row. You can select individual rows
(discontinuous items) by clicking in each row with the <Ctrl> key pressed. An
example is shown in Figure 6.36 and Figure 6.37.

FIGURE 6.36 - Incident Ray Table set to display selected rays

FIGURE 6.37 - Model with rays selected from the Incident Ray Table

Path Sorting
Path Sorting can be applied to the Incident Ray Table. To use Path Sorting with
the Incident Ray Table, select a surface, then select Analysis|Path Sorting, and
then select Analysis|Incident Ray Table. Next, select the path in the Path Sort
Table that you wish to display and select Analysis|Display Selected Paths.

6.54 TracePro 2022User’s Manual


Analysis Menu

Ray Files - Binary file format


Ray files saved in ASCII file format (.txt files) may be excessively large. TracePro
supports ray files in binary format, which result in smaller file sizes.
When saving a binary ray file from an Incident Ray Table, select the “Save As
type” as “Binary ray file (*.src) as shown in Figure 6.38.

FIGURE 6.38 - Save Incident Ray Data dialog illustrating Binary Ray File
format

Ray files saved in Binary Ray File format can be inserted into a TracePro model
as described in the section “Insert Source” on page 5.23.

Ray Histories
The Ray History Table window, as shown in Figure 6.39, displays the incident ray
direction, intercept coordinates, incident flux, optical path length, and the object
and surface names for the entire path of each ray as it strikes each surface along
the path. Each ray path history is displayed on its own sheet in the Ray History
Table window. Each ray history sheet can be scrolled using the usual cursor
controls, and you can view other sheets containing other ray histories using
Analysis|Ray Select|Next Ray and Analysis|Ray Select|Previous Ray, or
by using Alt+PgDn and Alt+PgUp, respectively. The Navigator buttons can be
used to select the ray. The navigator allows you to select the first ray (|<), previous

TracePro 2022 User’s Manual 6.55


Analysis

ray (<), next ray (>), or last ray (>|). You can also insert the ray number and press
the Enter key to display a specific ray.

FIGURE 6.39 - Ray History Table

The Ray History Table window can be viewed for any surface in the model. To
view a ray history table:
• choose the Edit|Select Surface menu item or press the Select Surface
toolbar button,
• select the surface for which you want to see the ray history table,
• choose Analysis|Ray Histories.
A new window opens with a ray history table for that specified surface. To view the
ray history table at another surface, select that surface with the mouse and the ray
table will be updated to show the rays at that surface.
Each sheet in the Ray History Table displays the columns listed in Table 6.7 with
additional columns for polarization data if polarization raytrace in enabled.

6.56 TracePro 2022User’s Manual


Analysis Menu

TABLE 6.7. Ray History Table Columns

Polarization
Label Description Ray Trace
Wavelength Wavelength for the current ray
Ray Node The ray starts with ray node 1 (at the source or grid) and the
first ray-surface intersection is node 2, etc.
Start Ray Start Ray 3 is the third ray started in the raytrace, for example.
X Pos., Y Pos., X, Y, and Z coordinates where the ray struck the surface
Z Pos.
Flux Flux of the incident ray.
OPL Optical path length of the ray, cumulative from the source—the
integral of the distance along the ray times the index of refrac-
tion
X Vec., Y Vec., Z Direction cosines of the departing ray
Vec.
Type SpecRefl for specular reflection, for example. See Table 6.3 on
page 6.51.
History Often blank. It refers to any special type of the ray node. For
example, TIR for total internal reflection. A totally internally
reflected ray on the ray node results in Type=SpecRefl and
History=TIR. See Table 6.4 on page 6.51.
Object Name of the object at the current ray node
Surface Name of the surface at the current ray node
S0, S1, S2, S3 Components of the Stokes vector in the local coordinate sys- enabled
tem of the ray
Deg Pol Degree of polarization of the ray enabled
Ellipse Ratio Ratio between the two axes of the polarization ellipse enabled
Xvec MajAxis, X, Y, and Z coordinates of a vector pointing in the direction of enabled
Yvec MajAxis, the major axis of the polarization ellipse
Zvec MajAxis

Copying and Pasting the Ray History Table Data


The ray history table data can be easily exported from TracePro to another
software package such as a spreadsheet or word processor. First, be sure the ray
history table window is the active window. Select Edit|Copy in TracePro (or Ctrl-
C). Switch to the other application and select Edit|Paste (or Ctrl-V). The tabular
data is transferred to the other program via the Windows clipboard.

Saving the Ray History Table in a File


You can also save the ray history table in a text file. Then the table can be
imported into a spreadsheet program, for example, or you can perform post-
processing operations using your own or other analysis software. To do this, first
be sure the ray history table is the active window (as indicated by a colored top
bar on the top of the window), then select File|Save As. The default extension
for the file is txt. Type the file name you wish to use and press OK. TracePro
saves a tab-delimited file containing the ray history table.

TracePro 2022 User’s Manual 6.57


Analysis

When you save the ray history table to a file, additional data columns are included
as shown in Table 6.8. The start ray number and the wavelength are given as
header lines. The columns are as follows:
TABLE 6.8. Ray History Table Columns: These columns are available when the
table is saved to a format outside of TracePro for post-processing.
Ray Node The ray starts with ray node 1 (at the source or grid) and the
first ray-surface intersection is node 2, etc.
Flux Flux of the incident ray.
OPL The optical path length of the ray, cumulative from the source.
This is the integral of the distance along the ray times the
index of refraction.
X Pos., Y Pos., Z The X, Y, and Z coordinates where the ray struck the surface.
Pos.
X Vec., Y Vec., Z Direction cosines of the departing ray.
Vec.
Type Kind of ray node, for example, SpecRefl for specular reflection.
Hist Often blank. Any special type of the ray node, for example, TIR
for total internal reflection—a totally internally reflected ray on
the ray node would result in Type=SpecRefl and History=TIR.
Object Name of the object at the current ray node
Surface Name of the surface at the current ray node
S0, S1, S2, S3 Components of the Stokes vector in the local coordinate
system of the ray
Deg Pol Degree of polarization of the ray
Ellipse Ratio Ratio between the two axes of the polarization ellipse
Xvec MajAxis,  X, Y, and Z coordinates of a vector pointing in the direction of
Yvec MajAxis,  the major axis of the polarization ellipse
Zvec MajAxis

Ray Sorting
Ray Sorting affects the display of rays in the model window and may be applied to
plots and tables. To open the Ray Sorting dialog box, select Analysis|Ray
Sorting. The default display of rays is All Rays, which displays all the branches
of every ray traced. The display of rays is not altered until you click the Update
button.

6.58 TracePro 2022User’s Manual


Analysis Menu

FIGURE 6.40 - Ray Sorting Dialog

All the Sort Type options in the Ray Sorting dialog box, except All Rays, require
you to select a surface before any sorting is done. Table 6.9 summarizes the
choices in Sort Type.

TracePro 2022 User’s Manual 6.59


Analysis

TABLE 6.9. Summary of Sort Type choices in Ray Sorting dialog box

Surface Selection
Sort Type Meaning Required?
All Rays All rays are displayed. No
Selected Only rays hitting the selected surface are dis- Yes
Surface played.
Specular Only rays hitting the selected surface that Yes
undergo only specular reflections or refractions
along the way are displayed. Scattered rays
are not displayed.
Single Sur- Only rays hitting the selected surface that Yes
face Scat- undergo exactly one surface scatter along the
ter way are displayed.
Multiple Only rays hitting the selected surface that Yes
Surface undergo more than one surface scatter along
Scatter the way are displayed.
Single Bulk Only rays hitting the selected surface that Yes
Scatter undergo exactly one bulk scatter along the way
are displayed.
Multiple Only rays hitting the selected surface that Yes
Bulk Scat- undergo more than one bulk scatter along the
ter way are displayed.
Single Dif- Only rays hitting the selected surface that Yes
fraction undergo exactly one aperture diffraction along
the way are displayed.
Multiple Only rays hitting the selected surface that Yes
Diffraction undergo more than one aperture diffraction
along the way are displayed.

The display of rays can also be sorted by source and by wavelength. The default
selections are for all wavelengths to be displayed. When Fluorescence is included
in the ray trace individual wavelengths are marked with Ex for Excitation and Em
for Emission showing how the rays contribute to the simulation. See
“Fluorescence Ray Trace” on page 3.15.
The percentage of starting rays to display can also be entered. This is useful
when you have done a raytrace with many rays. In such a case, there can be so
many rays that you cannot get any useful insight from the display. The default
percentage to display is 100%.
The Flux Display Range option can be used to control which rays are displayed by
the relative flux of the rays. The flux of each ray segment is divided by the starting
flux of the ray. If the result is between the Min and Max values, the ray segment
will be displayed. The default is for all ray segments will be displayed. To modify
the Flux Display Range settings, check the Flux Display box in the Ray Sorting
dialog box. You can input values for the Flux Range to eliminate the display of
rays outside of the selected range.
NOTE: Ray Sorting does not apply to Candela Plots nor 3D Irradiance Maps.

6.60 TracePro 2022User’s Manual


Analysis Menu

Export Rays
After you have done Ray Sorting, you can export the sorted rays in any of various
CAD file formats. To do this, simply select File|Export Rays, select the type of
the file to export, and type the name of the file. Finally, click Save to save the file.

Ray Sorting Examples


A simple example using a model with two blocks, the As2S3 surface property and
polychromatic Grid Source is shown in Figure 6.41.

FIGURE 6.41 - Generic model showing scattering of rays on back surface of


left block.

The irradiance map for the raytrace from Figure 6.41 for all rays and wavelengths
is shown on the left side of Figure 6.42, and the right shows the map for all
wavelengths but only Specular rays

TracePro 2022 User’s Manual 6.61


Analysis

FIGURE 6.42 - TracePro Irradiance maps, All rays (left), Specular rays (right)

The Irradiance Map Ray Sorting dialog is shown in Figure 6.43. Note that the
Window to which the sort will be applied is displayed at the top of the dialog.

Irradiance Window
will be affected

Display Specular Rays

FIGURE 6.43 - Ray Sorting dialog window.

The Incident Ray Table for the raytrace from Figure 6.41 shown in Figure 6.44 but
with the Sort Type set to Single Scatter. You can see that the only Intercept type
displayed is RandTran (Random Transmission) since a scattering surface
precedes the selected surface and any Specular rays suppressed.

6.62 TracePro 2022User’s Manual


Reports Menu

FIGURE 6.44 - Incident Ray Table.

Reports Menu
TracePro can generate reports on the raytrace and properties using the Reports
menu. You can generate a Raytrace report, a Flux report, or a Property Data
report. The reports provide summary information after a ray trace or about the
property informations in the case of a Property Report.

Flux Report
The Flux report provides a summary of the most recent raytrace. The data can
also be saved to a tab-delimited text file for viewing and post-processing in other
programs via the File|Save As menu.
Data columns include Surface Area, Wavelength and Source, Number of Incident
rays, Incident and Absorbed fluxes, and the Lost flux. Lost flux data is broken into
various categories to identify which mechanism caused rays to be lost.
Data is displayed for bulk absorption and incident flux for each object. The
incident flux is the sum of the flux entering the object so that the ray data is not
doubly counted when a ray passes into and out of the object. In the case of a
sphere that has a single surface, a ray passing through the sphere will have a
incident flux for object at half the value as that of the surface, in the loss less case.
The ray is incident on the object once but incident on the surface twice.
The lists at the top of the window allow you to choose which sources and which
wavelenths to include in the Flux Report.

TracePro 2022 User’s Manual 6.63


Analysis

The data is displayed for each object in red and for each surface in blue. If you
wish to display the report for only a few objects, first select the objects, either in
the System Tree or in the Model Window, display the report, and click the Display
Selected Objects button at the top of the report window. There is also an option to
Only display objects and surfaces with non-zero flux for absorbed, incident, or lost
flux.

FIGURE 6.45 - Flux Report

Property Data Report


This report displays the model's property data. This provides similar information
on the Objects and Surfaces as found from the System Tree. The data can be
saved to a tab-delimited text file for viewing and post-processing in other
programs via the File|Save As menu.
The data is displayed for each object in red and for the object's surfaces in blue. If
you wish to display the report for only a few objects, first select the objects, either
in the System Tree or in the Model Window, display the report, and click the
Display Selected Objects button at the top of the report window.

Raytrace Report
This report displays a modal dialog with the elapsed raytrace time for the most
recent raytrace of the active model.

Saving and Restoring a Raytrace


An analysis mode raytrace can be saved to disk for later display. First, put
TracePro into Ray Saving Mode by selecting File|Save Ray Data.
This action toggles the Save Ray Data menu item on and off. When the menu item
is checked and you save a TracePro model, a second file with the extension ray is
also saved. The ray file contains data for all the rays from the most recently
completed raytrace.

6.64 TracePro 2022User’s Manual


Tools Menu

To save ray data, first be sure that TracePro is in ray saving mode. You can check
this by looking at the File menu and confirming that the Save Ray Data item is
checked. (If it appears as , it is checked. Selecting it again
makes it unchecked.)
Then select File|Save As and type in a file name for the oml file. Press Save to
save the file, and TracePro will save both the oml file and the ray file.
It is important that the oml file and ray file stay synchronized. Changes to the
geometry and properties in the oml file will make the saved rays obsolete and
unrepresentative of the model. Changing the model requires re-running the
raytrace.
To restore a saved raytrace, simply open an oml file that has an associated ray
file. TracePro will find and open the ray file at the same time, and display the rays
(providing the Analysis|Display Rays menu item is checked). Once the rays
are restored, you can sort them using Analysis|Ray Sort and display irradiance
maps and candela plots. However, the Flux Report cannot be generated from the
ray file. You must re-run the raytrace to get a flux report.

Tools Menu
Several utility commands are grouped under the Tools menu. These include
auditing, geometry conversion, and database utilities. The database items are
described in another chapter. See “Property Database Tools” on page 3.83.

Audit
TracePro uses two kinds of audit, an update audit and a full audit.
TracePro Automatically performs an audit as the first part of a raytrace. This
automatic audit identifies only what has changed since the previous audit and
processes any changed data. If no previous audit data is found, TracePro initiates
a full audit.
You can manually initiate a full audit of the current model by selecting the menu
option, Tools|Audit. You may wish to employ such a “manual” audit prior to a
raytrace to locate problems such as flaws in surfaces, surface properties, or other
potential problems in the model. Error conditions that are discovered are
displayed in the Messages Window.
A manual audit overwrites all previous audit data. That contrasts with an
automatic audit in a raytrace, which only updates data that is changed from the
previous audit.

Delete Raydata Memory


Selecting Delete Raydata Memory causes TracePro to delete the contents of
raytrace memory that is used by the active model. Ray display and other analysis
are disabled after making this selection.

TracePro 2022 User’s Manual 6.65


Analysis

Collect Volume Flux

Overview
TracePro has the capability to perform volume flux calculations. From an analysis
mode raytrace, the user can describe a set of contiguous rectangular
parallelepiped cells. For each of the cells, four (4) flux values are calculated for
the given raytrace and the results are saved to a user-specified file. The four
categories of flux are: originating flux, incident flux, absorbed flux, and lost flux.
Limitation: The Volume Flux calculation does not work correctly with fluorescent
materials or gradient materials.
From the Tools menu, select Collect Volume Flux. The dialog box shown in
Figure 6.46 will appear.

FIGURE 6.46 - Example Volume Flux Options dialog box

The set of cells is described by two corner positions. For each dimension, X, Y,
and Z, the value for corner position 2 must be larger that than for corner position
1. The user also specifies the number of cells in each dimension. Finally, the
name of the results file is entered. The Show Cells button displays the collection
of cells in the model window as shown in Figure 6.47.

6.66 TracePro 2022User’s Manual


Tools Menu

FIGURE 6.47 - TracePro model window showing cells defined for volume
flux analysis. This example shows the cells placed inside a sub section
of a simple block geometry. The Show Cells button toggles to Hide
Cells after being chosen.

For any given raytrace, you can perform volume flux calculations numerous times.
By changing the inputs to the Volume Flux Options window, you can write the
results of volume flux calculations to different files. If desired, each of these
calculations can utilize a different volume flux cell configuration; cell positions,
number of cells, without having to repeat the raytrace. The data is uses the
Volume Flux Viewer to display the results from each file generated. See “View
Volume Flux” on page 6.68.
You can also write the results of different raytraces to the same file. This occurs
when the volume flux cell configuration does not change from one Apply and
Calculate selection to the next. In this case, the results from the current raytrace
are mathematically added to the results currently in the file. An incremental
counter, which keeps track of the number of simulations is also stored in the file.
A summary of what TracePro will do under different conditions is shown in
Table 6.10. For instance, if the specified Results File doesn’t exist, a new one is
always created. If the Results File does exist, then TracePro compares the data in
the file to the current state of the model and the current volume flux cell
configuration.

TracePro 2022 User’s Manual 6.67


Analysis

TABLE 6.10 - Summary of TracePro action depending on the current state of


the model. The “New” and “Old” labels signify whether changes were
made since the last time a volume flux calculation was performed.

Volume Flux New New Old Old


Cell
Configuration
Raytrace New Old New Old
User is prompted
TracePro Action User is User is New data is whether existing
prompted to prompted to added to data should be
overwrite overwrite existing added to existing
Results File Results File Results File data in Results
File

View Volume Flux

Overview
The Volume Flux Viewer, as shown in Figure 6.46, can be used to visualize data
that has been gathered by using the Collect Volume Flux option from the
Tools menu. When volume flux data is collected, it is saved to a text file, which
can be loaded into the Volume Flux Viewer. Since the volume flux data is
arranged in a 3-dimensional grid of data, the volume flux viewer allows you to
view any 2-dimensional slice of that data.
To use the Volume Flux Viewer, select Tools|View Volume Flux. Click the Open
button to open a Volume Flux file.

Press Open to select a data file.

FIGURE 6.48 - New viewer without data file.

6.68 TracePro 2022User’s Manual


Tools Menu

Flux Type
Once the volume flux file has been opened, you can change which Flux Type you
are viewing by selecting Absorbed, Incident, Lost, or Originating from the Flux
Type drop-down list. An example showing an Incident Flux Type is shown in
Figure 6.49.

FIGURE 6.49 - Changing the flux type.

Normal Axis/Orientation
The default is to look at the volume flux data with the positive Z axis pointing into
the screen (Normal Axis) and the positive Y axis pointing up and the positive X
axis pointing right. If, for example, as shown in Figure 6.50, you want to look at the
data with the X axis normal to the screen, and the positive Z axis pointing up and
the positive Y axis pointing to the left, then you would select the X axis as the
Normal Axis, and choose “+Z up, +Y left” from the Orientation drop-down list.

TracePro 2022 User’s Manual 6.69


Analysis

FIGURE 6.50 - Changing the orientation.

Slices
In this example, there are 50 cells along the x-axis. This means that in the above
orientation, there are 50 “Slices” of the data that can be displayed. To scroll
through the slices, use the spin control (Figure 6.51) to the right of the Normal
Axis control. The number just to the left of the spin control shows the axis
coordinate (in this case X) of the current slice of data.

FIGURE 6.51 - Spin control for Volume Flux Slices

Color Map
There are several color schemes available for displaying the data. Each can be
selected directly from the Color Map drop-down list.

Gradient
By default, the full range of the data is broken in to several ranges, and one
assigned to each color in the color map. The color palette on the left shows which
color corresponds to which range of data values. The gradient option creates a
continuous band of color for the color palette, and each data value in the map is
colored based on its position in the color gradient.

Logarithmic
This option will display the data on a logarithmic scale.

6.70 TracePro 2022User’s Manual


Tools Menu

Simulation File Manager


The Simulation File Manager, as shown in Figure 6.52, is opened from the Tools
menu and used to select ray files saved during a Simulation Mode raytrace for
viewing in the Irradiance Viewer described below. This requires that you select
Save data to disk during raytrace in Raytrace|Raytrace Options|Simulation
& Output before starting the Simulation Mode ray-trace. See “Save Data to Disk
during Raytrace” on page 5.48. TracePro collects sets of simulation data with an
Index file (.NDX) that holds information about the Model traced and notes for each
particular raytrace. The Simulation File Manager is used to read an index file to
select the desired data file to view, or Delete when the data is no longer needed.
Delete will remove the entry in the index file and delete the *.sim file.

Exit Surface files


The Index file includes links to Exit Surface and Missed Rays Candela Data files.
An Exit Surface files contains data needed to view an Irradiance/Illuminance Map
or Incident Ray Candela Plot. The name of an Exit Surface file ends with exN,
where N is the exit surface number, i.e. ex1 is the first exit surface tabulated by
TracePro. To view an Irradiance/Illuminance Map or a Candela Plot using Incident
Rays, first select the Exit Surface .sim file you wish to view, then choose the type
of plot from the View list at the bottom of the dialog box. Options for the plot are
available by right-clicking on the plot and selecting Options from the pop-up menu.
See “Irradiance Map Options” on page 6.8 and “Candela Options” on page 6.27

FIGURE 6.52 - Simulation File Manager.

Candela “Missed Rays” Files


TracePro can also save candela data for missed rays, if the checkbox for Collect
Missed Rays Candela Data in Raytrace|Raytrace Options|Simulation &

TracePro 2022 User’s Manual 6.71


Analysis

Output was selected before tracing rays. A Candela file name ends in “can” as
shown in Figure 6.52.To display a Missed Rays Candela Plot, choose the
appropriate “can” file, click View, and select the type of plot you wish to display.
Options for the plot are available by right-clicking on the plot and selecting
Options from the pop-up menu. See “Candela Options” on page 6.27.

Irradiance/Illuminance Viewer

Overview
TracePro has the capability to view Irradiance/Illuminance Maps that have been
previously saved as text files, and also to add or subtract data from multiple
Irradiance/Illuminance Maps. This could be used, for example, to analyze the light
distribution from an LED Array, where it is desirable to assess the contribution of
each individual LED, and then to see the result of all the LEDs combined.

Viewing a saved Irradiance/Illuminance Map


From the Tools Menu, select Irradiance/Illuminance Viewer, and select
View to display a previously saved Irradiance/Illuminance Map. Two types of files
may be opened, Text (.TXT) files and Simulation (.SIM) files. To create these files
see “Access to Irradiance Data” on page 6.15 and “Save Data to Disk during
Raytrace” on page 5.48 respectively.

Irradiance/Illuminance Viewer Options


The Irradiance/Illuminance Viewer Options are available by right-clicking on the
Irradiance/Illuminance Viewer window.

TXT Data Files


For Text (.TXT) files the options available in the Irradiance/Illuminance Viewer are
a subset of those available for an Irradiance Map. Some of the options are
disabled but show the value used when the data was saved to disk.
The available options include:
• Set Max
• Set Min
• Gradient Display
• Convert to foot-candles
• Log Scale
• Relief Plot
• Profiles
• Color Map

6.72 TracePro 2022User’s Manual


Tools Menu

For a description of the options see “Irradiance Maps” on page 6.7.

FIGURE 6.53 - Options dialog for Irradiance Viewer, TXT files.

SIM Data Files


For Simulation Files all of the options excluding selection of the Normal and Up
Vectors are supported. The Normal and Up Vectors must be defined when the Exit
Surface property is applied. See “Predefined irradiance map orientation” on
page 4.31.

TracePro 2022 User’s Manual 6.73


Analysis

FIGURE 6.54 - Options dialog for Irradiance Viewer, SIM files.

Adding and Subtracting Irradiance/Illuminance Maps


After an Irradiance/Illuminance Map has been opened in the Irradiance/
Illuminance Viewer, the Add and Subtract options are available from the Tools
menu. These options allow the user to combine data from additional maps, thus
being able to view the combined data. Note that after adding and subtracting
maps, the filename displayed in the Title Bar of the Irradiance/Illuminance Viewer
is the name of the first file that was viewed.
Note: Only Text (.TXT) files may use the add/subtract functions.
When adding and subtracting Irradiance/Illuminance Maps, it is important to
understand the effects of the following parameters on the Irradiance/Illuminance
Map text file:
• Smoothing ON or OFF
• Map Count
• Resolution
• Dimensions (linear dimensions of map)
As shown in Figure 6.55 below, the Irradiance/Illuminance Map text files start with
a fixed number of rows for header information, followed by an array or grid of
Irradiance/Illuminance values

6.74 TracePro 2022User’s Manual


Tools Menu

The Irradiance/Illuminance Viewer can only add two files with the same Grid Size.
For an unsmoothed map, the Grid Size is equal to the No. of Pixels. For a
smoothed map, the Grid Size is equal to the FFT Grid. TracePro will combine the
data provided the Grid Size of the two maps is the same, but there are two
instances where TracePro will provide a warning to verify that this addition/
subtraction is intended. One instance is if the linear dimensions of the two maps
are different (e.g. – one map is the data for a 1-mm x 1-mm Exit Surface while the
other map is the data for a 2-mm x 2-mm Exit Surface). The second instance is for
smoothed maps where the No. of Pixels is different. For a smoothed map, the No.
of Pixels parameter alters the “degree of smoothing”, so it may not be desirable to
add or subtract two maps with different smoothing characteristics. In the case
where smoothing is desired, it is best to save the unsmoothed data, then combine
them in the viewer whereupon smoothing can be added.

TracePro Release: 7 7 0
Irradiance Map Data for D:\TraceProData\EllipticalReflector.oml

Linear Units in millimeters


Data for Observation Disk Front
Data generated at 08:32:44 September 14, 2015

Raytrace Time: mins: 0, secs: 9

Projected Plane Extent from surface geometry


TopLeft:(300,300,1000)
TopRight:(-300,300,1000)
BottomLeft:(300,-300,1000)
BottomRight:(-300,-300,1000)
Corners of Data Set (plotted)
TopLeft:(300,300,1000)
TopRight:(-300,300,1000)
BottomLeft:(300,-300,1000)
BottomRight:(-300,-300,1000)
Total Incident Rays: 109966
Min: 4.96551e-012 Max: 1018.73 Ave: 25.8429
Total Flux: 7.30692 lm, Emitted Flux: 10 lm
Data Smoothing is On
Grid Size is 128 x 128
Map Count 50
Data Cells are 4.6875 x 4.6875 millimeters

6.74368e-009 5.85357e-009 6.14844e-009 8.58517e-009 6.04197e-009 5.58483e-009 .........


1.26708e-008 1.42955e-008 1.44828e-008 1.28075e-008 1.59571e-008 1.73264e-008 .........
1.22095e-008 2.14864e-008 2.25737e-008 2.53281e-008 2.35472e-008 2.33365e-008 .........

FIGURE 6.55 - Header section of a saved Irradiance/Illuminance Map with


initial data rows shown.

Candela Plot Viewer


The Candela Plot Viewer enables you to open candela output saved as a text file
and re-display the plot, or open a previously-saved *.sim file and make a new
Candela Plot.

TracePro 2022 User’s Manual 6.75


Analysis

Viewing a saved Candela Plot by opening a *.txt file


To open a saved Candela Plot, select Tools|Candela Plot Viewer, and an
Open dialog box will open. Select Files of type: *.txt, browse to the Candela file
you wish to view, and click Open. To control the options for the plot, right-click on
the plot and select Candela Options. The options that are available are a subset
of those available in the in-session Candela Options dialog box.

Viewing a Candela Plot by opening a *.sim file


By opening a *.sim file from a previous Simulation Mode ray-trace (with
Raytrace|Raytrace Options|Simulation & Output Save data to disk during
raytrace enabled) you can create a new Candela Plot with access to most of the
Candela Options settings that are used in a live session. The plot types available
depend on the file type opened as shown in Table 6.11.

TABLE 6.11. Candela plots available by opening *.sim files.

File type for raytrace no. N, Exit Surface no. M Candela plot available
Exit surface file (ModelName_N_exM.sim) Rays incident on Exit Surface
Candela Missed Rays file (ModelName_N_can.sim) Missed Rays

To open a *.sim file for creating a new Candela Plot, select Tools|Candela Plot
Viewer, and an Open dialog box will open. Select Files of type: *.sim, browse to
the file you wish to view, and click Open.

Analysis Toolkit
The Analysis Toolkit gives you access to enhanced plots of Candela Polar data,
including:
• Spectrum analysis
• Irradiance/Illuminance Map
• Road Luminance
• Candela - Rectangular Chart
• Candela - 360 degree Polar Chart
• Candela - 180 degree Polar Chart II
• Candela - Circular Polar Chart
• Candela - Circular Polar Chart II
• Beam Illuminance
• RCG Analysis
• LCS Analysis
• DHI Analysis
Open the Analysis Toolkit by selecting Tools|Analysis Toolkit or by right-
clicking on a Candela Plot and selecting Analysis Toolkit. To start an analysis tool,
double-click on the tool in the Analysis Toolkit window. Access options for each
plot by right-clicking on the plot.
The Analysis Toolkit has its own help system.

6.76 TracePro 2022User’s Manual


Tools Menu

Solar Emulator
The Solar Emulator is a fully automated interactive solar analysis utility. The solar
utility enables you to analyze solar collector systems by defining the geographical
location, period of sun travel, and solar power emission to simulate cloudy to clear
day calculations. Complete diagnostic output is available including irradiance and
candela maps on target surfaces, total flux on the target per time period, and
tabular output detailing efficiency over time. Use dialog boxes to setup sun
position, use Google Earth for location verification, verify trajectory using 3D earth
modeling, and qualify output analysis using dialog boxes. Once the emulator is set
up, it will perform ray-traces using TracePro to generate the needed data.
To start the Solar Emulator, select Tools|Solar Emulator.
The Solar Emulator has its own context-sensitive help system.

IES/LDT Plots
TracePro's IES/LDT Plots feature enables you to import photometric data in ANSI/
IESNA standard electronic file format or Eulumdat format to create TracePro
Surface Source and File Source Properties, and analyze the data. The
Illuminating Engineering Society of North America (IESNA) publishes "IESNA
Standard File Format for the Electronic Transfer of Photometric Data and Related
Information." The TracePro IES/LDT Import Utility adheres to IESNA Standard
LM-63-02, approved by ANSI on September 12, 2002. For more information on
the Eulumdat format, see www.helios32.com/Eulumdat.htm.
To use the IES/LDT Plots tool, select Tools|IES/LDT Plots.
The IES/LDT Plots tool has its own help system.

Lighting Toolkit Standard Expert

TracePro's Lighting Toolkit enables you to compare candela output to various


lighting standards. You can analyze your design's compliance with ECE, SAE, and
FMVSS standards. The toolkit provides visualization tools and regulation tables to
certify that simulated results meet the various standards and provides pass/fail
criteria for each regulation.
To open the Lighting Toolkit, select Tools|Lighting Toolkit.
The Lighting Toolkit has its own help system

Stray Light Analyzer Standard Expert

TracePro's Stray Light Analyzer provides a graphical user interface to set up the
iterative raytrace, analysis plots, and accurate sources required for stray light
analysis, making the process smooth and easy.
To open the Lighting Toolkit, select Tools|Stray Light Analyzer.
The Stray Light Analyzer has its own help system

TracePro 2022 User’s Manual 6.77


Analysis

Measurement Dialog
TracePro provides a tool to display information for different entity types in the
Model along with the relationship between two entities. The entities that can be
used are Surface, Edge and Vertex. The dialog, shown in Figure 6.56, provides a
selection of the Measurement Type based on the combination of entities to be
measured. The combinations may be:
• Vertex - Vertex
• Vertex - Edge
• Vertex - Surface
• Edge - Edge
• Edge - Surface
• Surface - Surface

FIGURE 6.56 - Measurement Dialog showing edge information and distance


between two selected edges

After the Measurement type is selected, TracePro will prompt for two selections.
After each selection information pertinent to the entity type is displayed. The
relationship between the two entities is displayed after the second item is
selected. The relationship is the closest distance between the two entities, the
transverse or delta distances between the entities, and the positions upon the two
entities from which the distances are calculated. The information is displayed in
Model Units and angles are displayed in degrees.
The Cursor will change to indicate the type of selection required.:

• Vertex Selection Cursor

• Edge Selection Cursor

• Surface Selection Cursor

6.78 TracePro 2022User’s Manual


Tools Menu

Figure 6.57 shows a model with an Edge-Edge measurement after the two edges
have been selected. The Cursor shows that an edge can be selected to continue
the next measurement.

FIGURE 6.57 - Elliptical Reflector with two edges selected for measurement

Figure 6.56shows the result of the measurement. When an edge is selected its
starting and ending positions are displayed in Model Units. The position is
displayed for a vertex. The distance is given as the minimum distance between
the two selections.

TracePro 2022 User’s Manual 6.79


Analysis

6.80 TracePro 2022User’s Manual


Introduction

CHAPTER 7 Technical Reference

Introduction
This chapter contains detailed information for many aspects of TracePro. Similar
topics appear in prior chapters giving general details and have referenced this
chapter for in depth coverage. Generally you can refer to the topics in this chapter
as needed.

The Use of Ray Splitting in Monte Carlo Simulation


Monte Carlo simulation is a field unto itself and is used to simulate many different
types of physical processes. Whenever processes are treated stochastically, with
samples chosen randomly and probability distributions used to model physical
processes, it is called Monte Carlo. In optics, the rays are the samples and
specular reflection and transmission, reflective and transmissive scattering, and
absorption are the processes. The Monte Carlo technique originates in the
Manhattan project during World War II, where it was used to simulate neutron
transport in fissionable material. The first computer on which Monte Carlo
simulations were done was a room full of people with calculators at Los Alamos,
supervised by the scientists there. Later at Los Alamos, the first electronic
computer was used to do Monte Carlo simulation. After the war and into the
1950s, Monte Carlo techniques were enhanced with variance reduction
techniques to vastly improve the speed of convergence of Monte Carlo
simulations. The most successful of these are splitting, importance sampling, and
stratified sampling. These techniques are still in widespread use today.
In the late 1950s and early 1960s, Monte Carlo was first used to trace rays, not for
optical simulations, but for simulation of radiative heat transfer. On those early
computers with limited processing power, they implemented what was called
“crude Monte Carlo” or Monte Carlo without any variance reduction. In the late
1960s, the first optical Monte Carlo program was developed: GUERAP. It used
both splitting and importance sampling for variance reduction. TracePro embodies
the same variance reduction techniques as GUERAP.
Also in the late 1960s, the first workers in computer graphics were making
pictures on line printers using crude Monte Carlo, which they dubbed “photon
tracing.” In crude Monte Carlo, a ray would retain all of its flux, and be either fully
absorbed or fully transmitted. Crude Monte Carlo does in fact conserve energy,
but also suffers from slow convergence, i.e. large variance for a given sample
population.
Ray Splitting as applied to ray tracing means that rays are split into different
components, each carrying a fraction of the incident flux. For each ray incident on
a surface, with Ray Splitting ON and 1 Random Ray per scatter selected,
TracePro creates up to four rays (specular R and T, scattered R and T) leaving the
surface. The sum of the flux of the four rays is equal to the flux of the incident ray
less any absorption at the surface (absorption can be considered as a fifth split
ray that doesn't propagate).
The truth of the matter is that, except in rare cases, the use of variance reduction
(including ray splitting) does reduce the variance, and sometimes in very dramatic

TracePro 2022 User’s Manual 7.1


Technical Reference

fashion. In stray light problems, the improvement in convergence may be a factor


of 1e10 to 1e20. These problems are completely hopeless without variance
reduction.
The ability to turn Ray Splitting OFF was implemented for those rare cases in
which even simple ray splitting results in a bushy “ray tree” and prodigious
memory usage. With Ray Splitting OFF, TracePro uses the Surface Property
components (specular R and T, scattered R and T) as the probability of a ray
having 1 of those 4 outcomes, and generates one new ray with flux equal to that
of the incident ray less any absorption at the surface. Ray Splitting OFF is the
nearest thing in TracePro to a crude Monte Carlo raytrace. However, in TracePro
with Ray Splitting OFF, a portion of the flux of each ray is absorbed, so each ray
may decrease in flux as it propagates. This variation from Crude Monte Carlo was
implemented because it reduces the variance without any extra memory usage.
In summary, it is recommended that Ray Splitting be left ON, that raytrace time be
controlled through the Flux Threshold and the number of starting rays, and that
the convergence be monitored by reviewing the Lost Flux column of the Flux
Report. The Ray Splitting OFF option is reserved only for those cases when good
results cannot be obtained with ray splitting on.

Importance Sampling Standard Expert

Importance sampling is a Monte Carlo technique in which rays are generated and
propagated in specific directions in the optical system, which are “important” in
determining the results you need. This improves sampling by increasing the
number of rays reaching the surface or surfaces of interest to the user.
Importance sampling is essential in a stray light analysis, where the attenuation of
incident light can be very great, and can be helpful in other types of analyses. In a
stray light analysis, there should be an importance sampling target for each
optical surface in the optical system.
It is important to remember that importance sampling is used only to enhance the
sampling of scattered and diffracted light or surface sources. Designs that include
only specular reflection and transmission cannot take advantage of importance
sampling — the direction of the rays is determined by the Law of Reflection and
Snell’s Law.
Figure 7.1 on page 7.3 illustrates importance sampling for the simple case of a
lens that scatters from its second surface. A second object is shown that
corresponds to a detector. In this case rays from an off-axis field position are
imaged such that all of the specular rays miss the detector. Generally, scattering
is stronger close to the specular direction of the un-scattered ray so the probability
of a randomly scattered ray hitting the detector is very small. When an importance
target is applied, it guarantees that the one or more importance rays will hit the
detector for each incident ray. Since the flux in the importance ray is scaled by the
solid angle and the scattering distribution, a “real” answer is simulated with the
fewest actual rays traced.

7.2 TracePro 2022 User’s Manual


Importance Sampling

random rays

specular rays

importance rays

FIGURE 7.1 - Lens shows specular, scatter, and importance rays

Importance Sampling and Random Rays


In the absence of importance sampling, TracePro generates rays in random
directions to simulate scattering. If you are simulating a problem in which light is
greatly attenuated, for example, stray light analysis, very little light or even none at
all reaches the surface you are concerned about. For example, if you are trying to
determine the likelihood of stray light reaching the detector from a source far
outside the field of view of an optical system with good stray light attenuation, you
might have to trace a very large number of rays (1010, 1020 or more) to get even
one ray to strike the detector. Importance sampling provides a way of increasing
the rate of occurrence in the simulation of physically unlikely events, while still
getting the right answer in the end. Importance sampling increases the probability
of events occurring that are important to you.
Importance sampling affects the tracing of scattered and diffracted rays. When a
ray strikes a surface with scattering and with importance sampling, the scattered
split ray component is further split into a randomly scattered component and an
importance sampled component. The direction of the importance sampled
component is determined by aiming the ray at an importance sampling target. In
principle, the flux given to the ray component is determined by calculating the
integral of the BSDF over the solid angle subtended by the importance sampling
target as seen from the intersection point on the scattering surface, and
multiplying by the incident flux,

 important =  incident  BSDF    cos  d . (7.1)



In practice, the integral is approximated by evaluating the BSDF at the ray
direction and multiplying by the solid angle subtended by the target,

 important   incident  BSDF   cos    . (7.2)

This approximation means that the flux of some importance-sampled rays is


underestimated and others are overestimated. To yield the correct result, it is
necessary to average the flux of a large number of rays. The flux of the

TracePro 2022 User’s Manual 7.3


Technical Reference

importance-sampled ray is subtracted from the total allocated for scattering. The
remainder of the flux is given to the randomly-scattered component. The direction
of the random component is chosen randomly, weighted by the BSDF. TracePro
checks the direction of the ray to be sure that it does not intersect the importance
sampling target. If it does intersect the importance sampling target, another
random direction is chosen and the check performed again. This process repeats
until a valid ray direction is found or until a specified threshold is exceeded. If the
threshold is exceeded, the random ray component is discarded.

When Do I Need Importance Sampling?


Use importance sampling for:
1. Stray light analysis
2. A non-imaging analysis involving scattering, especially when the collecting
area is relatively small
3. A surface source, when you want a large number of rays to be sampled in a
particular narrow direction
A good way to decide whether or not to use importance sampling is the following:
you usually want to have good sampling at the source and at the exit surface. The
fineness of sampling (the number of rays) you need over the source and the exit
surface depends on the specific simulation you are doing. In some cases, the
source is well-represented by only a few rays (tens or hundreds); in other cases,
many rays (thousands or millions) can be required.
The same is true for the exit surface. You directly control the sampling at the
source by choosing the number of starting rays and the type of ray distribution.
You indirectly control the number of rays at the exit surface for each starting ray by
using importance sampling. The more rays you start, the longer the simulation
takes to complete. Use of importance sampling increases the exit sampling and
the execution time as well, but produces many more samples at the surface of
interest. Proper use of importance sampling lets you get sampling at the surface
of interest with far fewer starting rays.
If the goal of your simulation is to predict the irradiance with fine spatial resolution,
you need a great many rays at the exit surface. You find that, due to the statistical
nature of the Monte Carlo technique, the irradiance distribution is noisy, just as in
a measurement of light with insufficient source intensity or insufficient integration
time. To improve the signal-to-noise ratio, you need to get more ray components
to the exit surface, just as in a measurement you might use a stronger source and/
or a longer integration time. You can get more ray components by starting more
rays and/or by increasing the importance sampling.

How to Choose Importance Sampling Targets


The objective of importance sampling is to increase the probability of rays going
along paths that are important to you. A rule of thumb is to obtain a probability of 1
(certainty) of a ray component reaching the surface of interest for each ray
started. For stray light analysis of optical systems with good stray light
suppression capabilities, this is a challenge. The optimal selection of importance
sampling is a matter of judgment, but several guidelines are given below. At a
minimum, however, importance sampling has to be defined for every optical
surface in a system when doing a stray light analysis.

7.4 TracePro 2022 User’s Manual


Importance Sampling

Importance Sampling Example


First, consider what happens if there is no importance sampling. Rays are
scattered and diffracted at each surface using the BSDF of that surface as a
probability distribution for ray directions. What if a ray enters an optical system,
strikes a sunshade as shown below, and the sunshade is coated with flat black
(Lambertian) paint?

FIGURE 7.2 - No Importance Sampling

A ray component randomly scattered from this surface has a distribution


probability equal to:

dP
------- cos 
= ------------ . (7.3)
d 
The probability of a ray going toward the lens is the integral of the probability
density over the solid angle subtended by the lens as viewed from the ray
intersection point on the sunshade. Suppose the lens has a radius Rlens = 1 and
the ray strikes the sunshade a distance d = 2 away from the lens and leaves the
sunshade at an angle of 60 degrees. Then the probability of the ray striking the
lens is approximately:

2
cos  R lens 1
p 1 = ------------  ----------------
- = --- . (7.4)
 d
2 8
Now suppose the lens has a typical BSDF for a polished surface, that is, sharply
peaked in the specular direction. For example, let the BSDF for the direction of
scattering toward the detector be:

–7 2
f s  3  10  sin  . (7.5)

TracePro 2022 User’s Manual 7.5


Technical Reference

Housing/Mount

L1 L2 Detector

FIGURE 7.3 - Scatter

To compute the probability of a ray that hits the lens, then scatters in a direction
such that it strikes an on-axis detector which is 1 milliradian on a side, as shown in
Figure 7.3. As before, the probability is approximately:

p = f S    cos  , (7.6)

where: = (10-3 radian)2, and suppose  = 30 degrees.


Evaluating the probability, we get:

– 12
p 2 = 1.04  10 . (7.7)

The probability of a ray scattering from the sunshade directly to the lens and then
directly to the detector is the product of those probabilities:

– 13
p total = p 1 p 2 = 1.30  10 . (7.8)

This means that we will have to start about 1013 rays to have a good chance of
getting one ray to go along a path like the one described. The most obvious way
to improve our chances is to set up importance sampling from the lens to the
detector. That increases p2 to 1, resulting in a much more tolerable situation:

1
p total = p 1 = --- . (7.9)
8
The detector surface cannot be defined as an importance sampling target for the
lens surface, as can be seen in Scatter, Figure 7.3. We need to set up importance
sampling toward the image formed by the lens surface, rather than the image
formed by the system. For surface L2, however, we set up importance sampling
directly to the detector.
Importance sampling targets must be located at the image formed by the optical
surface. In this way, any ray that strikes any optical surface always produces a ray
that hits the detector.

Material Properties
In TracePro, a material property specifies an index of refraction and a coefficient
of bulk absorption. In the Apply Properties dialog box, the Material tab lets you
choose a material property from the TracePro Property Database and apply it to
an object in a model.

7.6 TracePro 2022 User’s Manual


Material Properties

Material Property Database


Data can be added or modified in the property database by using the Material
Property Editor. This editor is on the Define|Edit Properties/Material
Properties menu.

The Material Property Editor can modify the interpolation type, description,
temperature and interpolation coefficients or table entries. A spreadsheet-like
window displays coefficients of interpolation formulae or wavelengths and index
values for tabular data. Absorption data is entered in units of inverse millimeters
(1/mm).
Selecting a catalog and entering a material name causes TracePro to display the
data for that material. Pressing Add Material Property opens a dialog box where
you enter the name of the new material.

Material Property Interpolation


The following interpolation formulas are available for material property data. The
ai values are displayed above the spreadsheet part of the window.
Schott:

2 2 a3 a4 a5 a6
N    = a 1 + a 2  + ----2- + ----4- + ----6- + ----8- (7.10)
   
Sellmeier 1:

2 2 2
2 a1  a2  a3 
N    – 1 = ----------------
2
- + ----------------
2
- + ----------------
2
- (7.11)
 – a4  – a5  – a6
Extended Schott:

2 8 6 4 2
N    = a1  + a2  + a3  + a4  + a5 (7.12)

a 6 a 7 a 8 a 9 a 10
+ ----2- + ----4- + ----6- + ----8- + -------
10
-
    
Herzberger:

2 2 4 6
N    = a1 + a2 L + a3 L + a4  + a5  + a6 
1 (7.13)
L = ------------------------
2
-
 – 0.028

Conrady:

TracePro 2022 User’s Manual 7.7


Technical Reference

a2 a3
N    = a 1 + ----- + --------
- (7.14)
  3.5
Sellmeier 2:

2
2 a2  a3
N    – 1 = a 1 + ----------------
2
- + ----------------
2 2
-
2
(7.15)
 – a4  – a5
Sellmeier 3:

2 2 2 2
2 a1  a2  a3  a4 
N    – 1 = ----------------
2
- + ----------------
2
- + ----------------
2
- + ----------------
2
- (7.16)
 – a5  – a6  – a7  – a8
Sellmeier 4:

2 2
2 a2  a3 
N    = a 1 + ----------------
2
- + ----------------
2
- (7.17)
 – a4  – a5
Handbook of Optics 1:

2 a2
- – a4 2
N    = a 1 + ---------------- (7.18)
2
 – a3
Handbook of Optics 2:

2
2 a2 
- – a4 2
N    = a 1 + ---------------- (7.19)
2
 – a3

7.8 TracePro 2022 User’s Manual


Material Properties

Gradient Index Profile Polynomials


The current Gradient Profiles have the following polynomial forms with associated
coefficients.
Axial-Radial gradient

2 3 4 2 4 6 8
n  r z  = n 0 + nz1z + nz2z + nz3z + nz4z + nr1r + nr2r + nr3r + nr4r

2 2 2
where… r = x +y

Axial-Elliptical gradient

2 3 4 2 4 6 8
n  r z  = n 0 + nz1z + nz2z + nz3z + nz4z + nr1r + nr2r + nr3r + nr4r

2 2 2
where… r = nrxx + nryy

Axial-Sinusoidal gradient

2 3 4 2 4 6 8
n  r z  = n 0 + nz1z + nz2z + nz3z + nz4z + nr1r + nr2r + nr3r + nr4r

= 1 + sva sin  --------- + svf  x + y 


2 z 2 2
where… r
 svp 

TracePro 2022 User’s Manual 7.9


Technical Reference

Axial-Tapered gradient

2 3 4 2 4 6 8
n  r z  = n 0 + nz1z + nz2z + nz3z + nz4z + nr1r + nr2r + nr3r + nr4r

2 2 2
where… r =  1 +  tasz + tao    x + y 

SELFOC gradient

2 2 2 4 6 8
n  r  = n 0  1 –  nr1r  + nr2  nr1r  + nr3  nr1r  + nr4  nr1r  

2 2 2
where… r = x +y

Wood Lens gradient

2
n  r  = n 0 + nr1r

2 2 2
where… r = x +y

Spherical gradient

2
n  r  = n 0 + nr1  sgc – r  + nr2  sgc – r  +
3 4
nr3  sgc – r  + nr4  sgc – r 

2 2 2 2
where… r = x + y +  z – sgc 

7.10 TracePro 2022 User’s Manual


Material Properties

Fisheye Lens gradient

n0
n  r  = --------------------------2-
1 +  ---------
r
nr1

2 2 2 2
where… r = x + y +  z – sgc 

Luneburg Lens gradient

2
n  r  = n 2 –  ---------
r
 nr1

2 2 2 2
where… r = x + y +  z – sgc 

GRADIUM gradient

z' z' 2 z' 3


n gwv  z'  = gnz0 + gnz1  ----------- + gnz2  ----------- + gnz 3  ----------- +
 gmz  gmz  gmz
z' 4 z' 5 z' 6
gnz 4  ----------- + gnz5  ----------- + gnz6  ----------- +
 gmz  gmz  gmz
z' 7 z' 8 z' 9
gnz7  ----------- + gnz8  ----------- + gnz9  ----------- +
gmz gmz gmz
z' 10 z' 11
gnz10  ----------- + gnz11  -----------
 gmz  gmz

where... z' = goz + z

TracePro 2022 User’s Manual 7.11


Technical Reference

TracePro supports two formats for GRADIUM: Buchdahl and Sellmeier. Both use
the above expression for ngwv(z’) as their index profile. The two GRADIUM
versions differ only in their dispersion formulae. The Buchdahl form is older and
now obsolete. It is included for backward compatibility. The Sellmeier form is
currently used by LightPath Technologies, the manufacturers of GRADIUM glass.
Both of these forms are described in detail below.
The GRADIUM (Buchdahl) dispersion is described by 16 coefficients via a fourth-
order expansion in Buchdahl’s chromatic coordinate .
At a wavelength other than gwv, the index is computed as follows.

2 3 4
n   z'  = n gwv + V 1  + V 2  + V 3  + V 4 
where...

 – gwv
 = ---------------------------------------
 – gwv
1 + -----------------------------
gwv – 0.187
3 2
V 1 = gra1n gwv + grb1n gwv + grc1n gwv + grd1
3 2
V 2 = gra2n gwv + grb2n gwv + grc2n gwv + grd2
3 2
V 3 = gra3n gwv + grb3n gwv + grc3n gwv + grd3
3 2
V 4 = gra4n gwv + grb4n gwv + grc4n gwv + grd4

The GRADIUM (Sellmeier) dispersion is described by 48 coefficients via a


modified Sellmeier model with three resonances.
At a wavelength other than gwv, the index is computed as follows.

7.12 TracePro 2022 User’s Manual


Material Properties

3 2 2
2 2 K i'   – gwv 
n   z'  – n gwv  z'  =  -----------------------------------
2
 – Li
-
i=1
where...
8
j–1
K' i =  K'ij  ngwv  z' 
j=1
and
8
j–1
L' i =  Lij  ngwv  z' 
j=1

TracePro 2022 User’s Manual 7.13


Technical Reference

Complex Index of Refraction


In the material property database, TracePro represents the complex index of
refraction by

n̂ = n + ik
where k is the extinction coefficient, and


k = ------- .
4
Here is the wavelength and  is the absorption coefficient. In the TracePro
Material Property Editor you can enter either  or k, and TracePro will calculate
the other parameter.
Some textbooks define the complex index of refraction as

n̂ = n  1 +  
with  denoted as the extinction coefficient or attenuation index, while still others
use

n̂ = n – ik
or

n̂ = n  1 – i  .
Calculating the Fresnel Coefficients, i.e. the relative flux of a reflected or
transmitted wave and its polarization state at the interface of two media is a
complicated procedure. However, for a wave at normal incidence on an interface
between air and a medium with complex refractive index, the calculation of the
reflectance is simpler (Born and Wolf, Fifth Edition, §13.2),
2 2
n 1 +   + 1 – 2n
n̂ – 1- 2 = -----------------------------------------------
R = ----------- -
2 2
n̂ + 1 n 1 +   + 1 + 2n
where we have used  = k/n.
It is important to be aware that k and  depend on  while  does not. When
interpolating the material property data, n and  are interpolated, and k is
calculated from .

7.14 TracePro 2022 User’s Manual


Surface Properties

Surface Properties
Surface properties describe reflection, transmission, absorption, and scattering of
a surface.

Coincident Surfaces
TracePro models often incorporate geometry with coincident surfaces. This
occurs for such systems where two objects have one common side, e.g., a
cemented doublet. This section describes the behavior of TracePro with respect
to Surface Properties applied to those coincident surfaces. The three cases are:
1. No Surface Property (i.e., <None>) applied to either coincident surface -
TracePro will calculate the reflectance and transmittance at this interface
based on the Index of Refraction specified in the Material Properties for the
two objects (the Fresnel reflection and transmission coefficients).
2. Surface Property applied to one coincident surface only while the other surface
has the Surface Propery of <None> - TracePro will use the parameters of the
single defined surface property to determine the flux and direction of the
resulting rays.
3. Surface Properties applied to both coincident surfaces - Although this
condition is somewhat nonsensical and is not recommended, TracePro will
combine the two surface properties in accordance with the equations below:

T 12  R 2
R c = R 1 + ------------------------------ , (7.20)
1 –  R1  R2 

T1  T2
T c = ------------------------------ , and (7.21)
1 –  R1  R2 

T1    A1  R2  + A2 
A c = A 1 + ------------------------------------------------- , (7.22)
1 –  R1  R2 
where R1, T1, and A1 are the reflectance, transmittance, and absorptance,
respectively, of the first coincident surface; R2, T2, and A2 are the reflectance,
transmittance, and absorptance, respectively, of the second coincident surface;
and Rc, Tc, and Ac are the reflectance, transmittance, and absorptance,
respectively, of the resulting combined property.
Note that other surface properties, such as the BSDF (BRDF or BTDF) are found
in an analogous method.

BSDF
The Bidirectional Scattering Distribution Function (BSDF) is a measure of the light
scattered from a surface in different directions. The BSDF is a function of both the
incident direction and the scattering direction, hence the term bidirectional.
Mathematically, the BSDF is defined as the scattered radiance per unit incident
irradiance, or

TracePro 2022 User’s Manual 7.15


Technical Reference

dL s   s  s 
BSDF   i  i  s  s  = --------------------------- . (7.23)
dE i   i  i 

Because radiance has units watts/m2-sr and irradiance has units watts/m2, the
BSDF has units 1/sr (inverse steradians). Note that this equation for BSDF takes
into account the projection of the surface “emitting” the scattered radiation, thus
you can view Equation 7.23 as

P scat  
BSDF = ---------------------------------- . (7.24)
P inc  cos  scat
where Pscat is the scattered power, Pinc is the incident power,  is the solid angle
upon scattering, and scat is the scatter angle from the normal to the scatter
location. To remove this cosine dependence, you must post process in other
software such as Excel.
In TracePro, the BSDF model is shift-invariant with respect to the incident
direction. This property of BSDFs for polished surfaces was discovered by Harvey
in his doctoral dissertation (See “Harvey-Shack BSDF” on page 7.16.). This
means that the shape of the BSDF depends only on the difference between the
specular direction and the scattered direction. This type of model is useful for a
wide variety of surfaces, particularly optically polished surfaces.
The BSDF is really a generic term for scattering from surfaces. There are three
specific types of BSDF:
• BRDF (Bidirectional Reflectance Distribution Function)
• BTDF (Bidirectional Transmittance Distribution Function)
• BDDF (Bidirectional Diffraction Distribution Function)

Harvey-Shack BSDF
In his dissertation (J. E. Harvey, “Light-Scattering Properties of Optical Surfaces,”
Ph.D. Dissertation, U. Arizona, 1976) Harvey found that for many optical surfaces,
the BSDF is independent of the direction of incidence if it is expressed as a
function of direction cosines instead of angles. Harvey called this property “shift-
invariant,” as in linear systems theory. Referring to Figure 7.4, 0 is a projection
onto the surface of the unit vector r0 in the specular direction,  is a projection
onto the surface of the unit vector r in the scattering direction, and the magnitude
of their difference, |-0|, is the argument of the BSDF. Note that  and 0 are not
unit vectors. They are projections of unit vectors, so their lengths are less than or
equal to one. The Harvey-Shack method gives a good model for the behavior of
most optical surfaces, i.e. those for which:
• Scattering is due mainly to surface roughness
• Scattering (and thus surface roughness) is isotropic
• Surface roughness is small compared to the wavelength of light

7.16 TracePro 2022 User’s Manual


Surface Properties

FIGURE 7.4 - Harvey-Shack BSDF: a shift-invariant BSDF representation

When measuring or evaluating the BSDF in the plane of incidence, i.e., when the
scattering direction r lies in the same plane as the incident and specular directions
ri and r0, the value of |-0| reduces to |sin - sin0|, where  is the angle between
the scattering direction and the surface normal, and 0 is the angle between the
specular direction and the surface normal. For light incident normal to the surface,
0=0 and so |-0|=sin. Measurements are often made only in the plane of
incidence, and many BSDF plots have |sin - sin0|, sin - sin0, sin, or  as the
horizontal axis.

ABg BSDF Model


The BSDF model used in TracePro is a quasi-inverse-power-law model called the
ABg model. It is called the ABg model because of the three parameters in the
following equation,

A
BSDF = -----------------------------g- , (7.25)
B +  – 0
where A, B, and g are parameters that can be used to fit the formula to measured
data.

TracePro 2022 User’s Manual 7.17


Technical Reference

A typical ABg model BSDF, graphed on a log-log scale, is shown in Figure 7.5.
1E3

Power law
1E2 BSDF

BSDF (1/sr) 1E1 Roll-off point

1E0 Roll-off value

1E-1 ABg model

1E-2
Roll-off ß-ßo

1E-3
0.001 0.01 0.1 1
|ß-ßo|

FIGURE 7.5 - ABg BSDF Model where A=0.0025, B=0.001, and g=1.8

Note the following properties of the ABg BSDF model:


• B must be greater than zero unless g is zero.
• If g is zero, it becomes a Lambertian BSDF with value A/(B+1), and total inte-
grated scatter equal to A/(B+1).
• If g is less than zero, the BSDF increases with |-0|. Some surfaces display
this behavior.
Most optically polished surfaces exhibit a BSDF with a shape that is well fit by this
model. The model has a flat region at small values of |-0|, a transition region
around the roll-off point, and a region of nearly constant slope equal to (-g) at
large values of |-0|. Values of g typically are between 1 and 3 depending on
substrate material, polishing method, and degree of polish. Values of B are
typically 0.001 or smaller, and values of A vary widely. The value of the BSDF at
|-0|=0, where the curve “flattens out” is given by

BSDF  0  = A  B . (7.26)
The value of |-0| at which the curve rolls off, i.e., the roll-off |-0| in the curve
above, determines the parameter B. B is related to the roll-off |-0| and g by

g
B =   rolloff  . (7.27)

BRDF, BTDF, and TS


BSDF is an abbreviation for Bidirectional Scattering Distribution Function. BSDF
is a generic term. Specific terms used for describing scattering are:
• BRDF — Bidirectional Reflectance Distribution Function

7.18 TracePro 2022 User’s Manual


Surface Properties

• BTDF — Bidirectional Transmittance Distribution Function


These quantities refer to reflective and transmissive scattering, respectively.
When defining a Surface Property in TracePro, you can define both the BRDF and
the BTDF.
A quantity associated with the BSDF is the Total Scatter, or TS. In TracePro, the
TS is defined as the integral of the BSDF over all angles,

2   2

TS=   BSDF   i  i  s  s  cos  sin   d  d , (7.28)

0 0
where  and  are spherical polar coordinates defined with the surface normal as
the z axis. For light incident normal to a surface, i and i are zero, and s =  and
s = , and the TS is

2   2

TS=   BSDF  0 0  s  s  cos  sin   d  d . (7.29)

0 0
In order for TracePro to conserve energy, all the light incident on a surface must
be accounted for in a surface property. This means the sum of the coefficients for
absorption, specular reflection and transmission, and scattering, must equal one,

a + R S + T S + R TS + T TS = 1 , (7.30)

where a = absorptance
Rs = specular reflectance
Ts = specular transmittance
RTS = TS for reflection
TTS = TS for transmission.
When you edit an existing Surface Property or add a new one, TracePro will not
let you leave the Surface Property Editor if this conservation of energy equation is
not satisfied. You have the option of having TracePro solve for any of these
quantities in the editor.

Asymmetric BSDF
An asymmetric BSDF is one that is not cylindrically symmetric in direction cosine
space. Asymmetric BSDFs in TracePro include the elliptical BSDF models, which
have mirror symmetry about two orthogonal axes, the one-dimensional BSDF
models, and the Asymmetric Table BSDF, which in general has no symmetry.
When you apply an asymmetric BSDF to a surface, a reference axis for the
asymmetry must also be specified. There are two ways to do this in TracePro. You
can either:
• Specify a fixed reference axis (use this for most asymmetric BSDFs).
• Specify that the reference axis “floats” with the plane of incidence.

TracePro 2022 User’s Manual 7.19


Technical Reference

This choice is controlled by the Use fixed axis for zero-azimuth for asymmetric
scatter checkbox in the Surface pane of the Apply Properties dialog box. In most
cases, you should check this check-box and enter the direction cosines of a
reference axis in the Anisotropic Axis tab. The Anisotropic Axis is also used for the
reference axis for the BSDF.
A useful hint to decide whether to use the Use fixed axis for zero-azimuth for
asymmetric scatter option is as follows: If, when you shine light on your surface,
the asymmetric scatter pattern rotates as you rotate the substrate, choose Use
fixed axis for zero-azimuth for asymmetric scatter. If, on the other hand, the
asymmetry of the scatter remains stationary as you rotate the substrate, you
should uncheck the Use fixed axis for zero-azimuth for asymmetric scatter
option.
When you apply a surface property with an elliptical BSDF, the x axis is the zero-
azimuth axis, and the z axis is the surface normal. The y axis is determined by the
right-hand rule.
The geometry for scattering is shown in Figure 7.6 for the Use fixed axis for zero-
azimuth for asymmetric scatter option, and in Figure 7.7 for the unchecked option,
in which the x axis or zero-azimuth axis always orthogonal to the plane of
incidence. The plane of incidence is the plane containing the incident direction
and the surface normal.

FIGURE 7.6 - Scattering geometry for the Use fixed axis for zero-azimuth for
asymmetric scatter option.

7.20 TracePro 2022 User’s Manual


Surface Properties

FIGURE 7.7 - Scattering geometry with the Use fixed axis for zero-azimuth
for asymmetric scatter option unchecked.

Asymmetric Table BSDF


An asymmetric table BSDF model uses a table of BSDF values to specify the
BSDF. The table is rectangular, i.e. you enter a list of |-0| values and azimuth
values, and enter a BRDF and BTDF value for every combination of |-0| and
azimuth. The beta coordinates are linear in plane of the surface as shown in
Figure 7.6 and Figure 7.7. Therefore, the ring of constant |-0| represents one
value of |-0|, and the the azimuth angles for that |-0| value are different points
spaced around the ring.
It is helpful to think of the |-0| and azimuth as plane polar coordinates, with |-
0| as the radius coordinate. The plane for these coordinates is the tangent plane,
the origin is the projection of the specular direction onto the tangent plane (i.e. the
tip of the 0 vector), and the azimuth=0 axis is the local x axis.

Elliptical BSDF
An elliptical BSDF is one that has coefficients that are elliptically interpolated, and
therefore produces an asymmetric distribution of scattered light. An elliptical
BSDF is one particular kind of asymmetric BSDF. The ABg model in TracePro is

TracePro 2022 User’s Manual 7.21


Technical Reference

symmetric versus |-0| whereas the elliptical BSDF is asymmetric. Two elliptical
BSDF models are available in TracePro: elliptical ABg and elliptical Gaussian.
When you create a surface property with elliptical BSDF in TracePro, the ellipse
that determines the orientation of the scatter is defined by x and y axes. You must
enter coefficients along for of the axes. The direction of the x axis is specified
when apply the surface property to a surface. If you make an anisotropic surface
property with an elliptical BSDF, one direction vector serves to orient both the
anisotropic coefficients and the scattering ellipse. When you create an anisotropic
surface property, you can add as many values of  and  as you wish to the
property. For each temperature and wavelength, the surface property editor will
create a table of coefficients for each pair of  and . For each pair of  and , you
enter the peak BSDF and the x and y coefficients of the BSDF.

FIGURE 7.8 - Elliptical BSDF coordinates

Many surfaces exhibit asymmetric scattering behavior. Any surface that “looks
different” from different directions is probably exhibiting asymmetric scattering.
For example, a brushed or machined surface may scatter asymmetrically. Many
composite materials that have fibers oriented in a particular direction exhibit
asymmetric scattering. Some diffusers are designed to exhibit asymmetric
scattering behavior, such as holographic diffusers.
Despite its versatility and generality, there are limitations to the capability of the
TracePro elliptical BSDF. If you apply an elliptical BSDF surface property to a
plane surface, the “grain” of the surface is fixed to one direction. To get the

7.22 TracePro 2022 User’s Manual


Surface Properties

elliptical BSDF to be spatially dependent (i.e. to be different on different parts of


the surface) you would have to break up the object on which the surface resides
into smaller pieces.
However, you can model circular brush marks on a parabolic reflector, for
example. Because the “azimuth = 0” axis that you enter is projected onto the
tangent plane in order to calculate the azimuth angle, the orientation of the
azimuth = 0 axis determines the symmetry of the elliptical BSDF. Suppose the
axis of the reflector is along the z axis in the figure above. To model brush marks
that go around the reflector, you would enter the azimuth=0 axis as (0, 0, 1) or
along the z axis. To make brush marks parallel to the axis of the reflector, enter an
azimuth=0 axis perpendicular to the reflector axis, e.g. (1, 0, 0) or (0, 1, 0). To
make elliptical brush marks at a skew angle, enter an azimuth=0 axis that is
neither parallel nor perpendicular to the reflector axis.

Elliptical ABg BSDF model


The elliptical ABg BSDF model is based on the ABg model, which is symmetrical.
The elliptical ABg model is so called because you specify the axes of an ellipse for
each coefficient, and TracePro fits an ellipse to these axes to determine the
coefficients in other directions. The elliptical ABg model is determined by the
following algorithm:
1. When you create a surface property with elliptical BSDF, you enter B and g
coefficients for x and y axes.
2. When you apply the property, you specify the azimuth=0 axis. This becomes
the local x axis for determining the coefficients.
3. During the ray trace, the local surface normal and the azimuth=0 axis are used
to construct a local coordinate system. The surface normal is the local z axis
and the azimuth=0 axis is the local x axis. If the azimuth=0 axis is not
perpendicular to the surface normal, a new x axis is created by rotating the
azimuth=0 vector in a plane containing it and the normal such the x axis is
perpendicular to the normal (i.e. the local x axis lies in the tangent plane).
4. The direction of the scattered ray is projected onto the tangent plane and the
azimuth angle  is determined. See “Elliptical BSDF coordinates” on
page 7.22.
5. The coefficients B and g are determined by making the x and y components
axes of an ellipse,

------- = ------------------
cos   2- -----------------
sin   2-
1
2 2
+ (7.31)
B Bx B y2
and

1  cos   2  sin   2
------2- = ------------------
- + -----------------
- (7.32)
g g x2 g y2
6. The ABg BSDF is evaluated in the same way as for symmetrical ABg BSDF
model, i.e.

A
BSDF = --------------------------------g- (7.33)
B +  –  0
7. Finally, the A coefficient is determined from

TracePro 2022 User’s Manual 7.23


Technical Reference

A
BSDF  0  = ----- (7.34)
B
or

A = BSDF  0   B (7.35)
where BSDF(0) is the peak BSDF. When you create an elliptical ABg BSDF
model, then, for each row you enter the following coefficients:
• Peak BRDF
• BRDF Bx
• BRDF By
• BRDF gx
• BRDF gy
• Peak BTDF
• BTDF Bx
• BTDF By
• BTDF gx
• BTDF gy

Elliptical Gaussian BSDF


The elliptical Gaussian BSDF has a much simpler form. You enter the peak BSDF
and the 1/e2 half-width in either direction. Then the BSDF has the form

x2 y2
– 2  ----2 + ----2
BSDF = BSDF  0 e sx sy
(7.36)
where BSDF(0) is the peak BSDF. When you create an elliptical Gaussian BSDF
model, then, for each row you enter the following coefficients:
• Peak BRDF
• BRDF sx
• BRDF sy
• Peak BTDF
• BTDF sx
• BTDF sy

The sx and sy values are the 1/e2 half-widths of the elliptical Gaussian BSDF in
terms of -0. For the case of normal incidence (0 = 0 deg), a -0 value of 0.5
would equate to a 1/e2 half-width of 30 deg, sin(30)-sin(0) = 0.5.

1D ABg BSDF Model


The 1D ABg BSDF model is an asymmetrical BSDF model based on the ABg
model, which is symmetrical. 1D BSDF models are used to model surfaces that
scatter strongly in one plane, for example brushed or machined surfaces. The 1D

7.24 TracePro 2022 User’s Manual


Surface Properties

ABg model is a product of two orthogonal functions. Along the local x direction it is
an ABg model, and along the local y direction it is a Gaussian.
1. When you create a surface property with 1D ABg BSDF, you enter B and g
coefficients for the x axis, and a sigma value for the y axis.
2. When you apply the property, you specify the azimuth=0 axis. This becomes
the local x axis for orienting the scatter pattern.
3. During the ray trace, the local surface normal and the azimuth=0 axis are used
to construct a local coordinate system. The surface normal is the local z axis
and the azimuth=0 axis is the local x axis. If the azimuth=0 axis is not
perpendicular to the surface normal, a new x axis is created by rotating the
azimuth=0 vector in a plane containing it and the normal such the x axis is
perpendicular to the normal (i.e. the local x axis lies in the tangent plane).
When you create a 1D ABg BSDF model, then, for each row you enter the
following coefficients:
• BRDF A
• BRDF B
• BRDF g
• BRDF sigma

1D Table BSDF Model


The 1D Table BSDF model is an asymmetrical BSDF model that uses a table of
BSDF values along the +/-x direction, and a Gaussian along the y direction. 1D
BSDF models are used to model surfaces that scatter strongly in one plane, for
example brushed or machined surfaces. The 1D Table model is a product of two
orthogonal functions. Along the local x direction it is a table of values, and along
the local y direction it is a Gaussian.
1. When you create a surface property with 1D Table BSDF, you enter a table of
values for the x axis, and a sigma value for the y axis.
2. When you apply the property, you specify the azimuth=0 axis. This becomes
the local x axis for orienting the scatter pattern.
3. During the ray trace, the local surface normal and the azimuth=0 axis are used
to construct a local coordinate system. The surface normal is the local z axis
and the azimuth=0 axis is the local x axis. If the azimuth=0 axis is not
perpendicular to the surface normal, a new x axis is created by rotating the
azimuth=0 vector in a plane containing it and the normal such the x axis is
perpendicular to the normal (i.e. the local x axis lies in the tangent plane).
The table of values along the x axis is versus positive and negative values of (-
0)x to enable asymmetry along the local x axis.

TracePro 2022 User’s Manual 7.25


Technical Reference

Calculation of Fresnel coefficients during raytrace


If the surface property is of type Fresnel, then the specular reflectance and
transmittance coefficients must be calculated during the raytrace.
This is done in the following way:
• Calculate the absorptance, reflectance, and transmittance based on the mate-
rial property.
• Use the calculated absorptance for the absorptance coefficient.
• Use the calculated reflectance for the total reflectance.
• Adjust the Total Scatter (TS) for the angle of incidence. The TS in the database
is for normal incidence. 

The adjusted TS for reflectance is

R total   
TS refl    = TS refl  0   --------------------- .
R total  0 
The adjusted TS for transmittance is

T total   
TS trans    = TS trans  0   --------------------- .
T total  0 
• Calculate the specular reflectance and transmittance as the total minus TS,
R spec    = R spec    – TS refl   
and

T spec    = T spec    – TS trans   

Anisotropic Surface Properties Standard Expert

According to the Merriam-Webster Collegiate Dictionary, anisotropic means:


Main Entry: an·iso·trop·ic 
Pronunciation: “a-”nI-s&-'trä-pik
Function: adjective
Date: 1879
: exhibiting properties with different values when measured in different directions
<an anisotropic crystal>

Anisotropic really means “not isotropic,” and isotropic means (again according to
the Merriam-Webster Collegiate Dictionary) “exhibiting properties (as velocity of
light transmission) with the same values when measured along axes in all
directions.” For a surface property, anisotropic behavior means that the
coefficients can vary versus the direction of incidence. In a TracePro surface
property, the direction of incidence is described by two angles, a polar angle  and
an azimuth angle  like in spherical coordinates. The polar angle is the angle
between the incident ray and the surface normal. With the surface normal as the z
axis, the x and y axes lie in a plane tangent to the surface as in Figure 7.9.

7.26 TracePro 2022 User’s Manual


Surface Properties

FIGURE 7.9 - Polar Coordinates for anisotropic surface property

When you create a surface property in TracePro, you can add as many values of
 and  as you wish to the property. For each temperature and wavelength, the
surface property editor will create a table of coefficients for each pair of  and .
For an anisotropic surface property, the BSDF can be either the standard ABg
model or an elliptical or table BSDF model, giving you full control over the
behavior of the surface.
When you apply an anisotropic surface property to a surface, you must also
specify the direction where the azimuth angle is zero. This is the x axis in Figure
7.9.

Anisotropic surface types


Many surfaces exhibit anisotropic behavior. Any surface that “looks different”
when light is shined from different directions is exhibiting anisotropic behavior. For
example, a brushed or machined surface may reflect a different amount of light
depending on the direction of incidence. Many composite materials that have
fibers oriented in a particular direction exhibit anisotropy. Some diffusers are
designed to exhibit anisotropic behavior.

TracePro 2022 User’s Manual 7.27


Technical Reference

Despite its versatility and generality, there are limitations to the capability of the
TracePro anisotropic surface property. If you apply an anisotropic surface property
to a plane surface, the “grain” of the surface is fixed to one direction. To get the
anisotropy to be spatially dependent (i.e. to be different on different parts of the
surface) you would have to break up the object on which the surface resides into
smaller pieces, one for each anisotropy direction.
However, you can model circular brush marks on a parabolic reflector, for
example. Because the “azimuth = 0” axis that you enter is projected onto the
tangent plane in order to calculate the azimuth angle, the orientation of the
azimuth = 0 axis determines the symmetry of the anisotropy. Suppose the axis of
the reflector is along the z axis in Figure 7.9. To model brush marks that go around
the reflector, you would enter the azimuth=0 axis as (0, 0, 1) or along the z axis.
To make elliptical brush marks at a skew angle, enter an azimuth=0 axis that is
neither parallel nor perpendicular to the reflector axis.

Getting anisotropic data


To obtain data for an anisotropic surface, you will probably have to make
measurements from a sample of material. If you do not have the equipment and
expertise to make these measurements, you can contract with any of several
commercial labs to make the measurements. Lambda Research does not
endorse any particular laboratory, but the quantity you need to measure is
sometimes referred to as the Hemispherical Directional Reflectance or
Transmittance Function, often abbreviated as HDRF or HDTF. This gives you the
total reflectance or transmittance versus direction of incidence (by a reciprocity
argument) but may or may not distinguish between specular and scattered
components. The best way to separate these is to also make BRDF and/or BTDF
measurements for several directions of incidence. So to fully characterize an
anisotropic surface, you need two sets of measurements: HDRF/HDTF and
BRDF/BTDF. For example, to create a surface property for an opaque surface (so
that the specular transmittance and BTDF are zero) you would:
1. Obtain BRDF and HDRF measurements of a sample.
2. Fit the BRDF measurements using one of the BSDF models in TracePro.
3. Enter the BRDF coefficients into the surface property.
4. Calculate the absorptance versus  and  as A = 1 – HDRF and enter into the
surface property.
5. Solve for Reflectance in the surface property editor.
When you make the measurements, be sure that orientation of the sample with
respect to the measurement apparatus is known. Define a local axis on the part,
and reference all measurements to this axis. This will become the azimuth = 0
axis when you create the surface property in TracePro.

User Defined Surface Properties Expert

Overview
TracePro Expert provides interfaces for user defined properties using dynamic
link libraries (DLLs). Currently Surface and Bulk Scatter properties are available.

7.28 TracePro 2022 User’s Manual


Surface Properties

To use these properties, you must create a DLL which will perform the property
calculations and define a property in the property editor which may be applied to a
surface or object in TracePro.

Creating a Surface Property DLL


To create a TracePro, first download the SourceFilesForCreatingPropertyDLLs.zip
file from www.lambdares.com, in the Tech Support section under
TracePro>Properties. Unzip the file to obtain a Microsoft Visual Studio Solution
and a set of source files that serve as a template for the creation of a C++ DLL.
Through this DLL interface, you can write custom surface properties that can be
applied to surfaces within a TracePro model. When tracing rays, TracePro’s
raytrace engine will interact with these surface properties as prescribed by the
your programmed instructions.
Currently, the following set of inputs and outputs are supported. Provisions have
been made to expand the sets of inputs and/or outputs in the future. The delivered
source files serve as further clarification and documentation of this
implementation.
TABLE 7.1. Surface Property DLL Inputs

Description Variable
wavelength input[WAVELENGTH]
temperature input[TEMPERATURE]
position X input[RAY_POS_X]
position Y input[RAY_POS_Y]
position Z input[RAY_POS_Z]
incident direction X input[RAY_DIR_X]
incident direction Y input[RAY_DIR_Y]
incident direction Z input[RAY_DIR_Z]
flux S0, (Stokes Vector) input[RAY_FLUX_S0]
flux S1, (Stokes Vector) input[RAY_FLUX_S1]
flux S2, (Stokes Vector) input[RAY_FLUX_S2]
flux S3, (Stokes Vector) input[RAY_FLUX_S3]
flux SX, (Stokes Vector) input[RAY_FLUX_SX]
flux SY, (Stokes Vector) input[RAY_FLUX_SY]
flux SZ, (Stokes Vector) input[RAY_FLUX_SZ]
surface normal X input[SURF_NORM_X]
surface normal Y input[SURF_NORM_Y]
surface normal Z input[SURF_NORM_Z]
n reflection side input[N_REFL_SIDE]
k reflection side input[K_REFL_SIDE]
n transmission side input[N_TRAN_SIDE]
k transmission side input[K_TRAN_SIDE]

TracePro 2022 User’s Manual 7.29


Technical Reference

TABLE 7.2. Surface Property DLL Outputs


By assigning as follows:
results[SIGNAL_TO_TRACEPRO] = 
COATING_DLL_SIGNAL_NONE

Description Variable
s – absorptance results[ABSO_S]
p – absorptance results[ABSO_P]
s – reflectance results[REFL_S]
p – reflectance results[REFL_P]
s – transmittance results[TRAN_S]
p – transmittance results[TRAN_P]
Phase reflection [deg] results[PHAS_R]
Phase transmission [deg] results[PHAS_T]

By assigning as follows:
results[SIGNAL_TO_TRACEPRO] =
COATING_DLL_SIGNAL_USE_MUELLER_MATRIX

Description Variable
16 Mueller Matrix components results[REFL_MM_xy]
for reflection x -> 0 to 3 ; y-> 0 to 3
16 Mueller Matrix components results[TRAN_MM_xy]
for transmission x -> 0 to 3 ; y-> 0 to 3

By assigning as follows:
results[SIGNAL_TO_TRACEPRO] =
COATING_DLL_SIGNAL_FULL_RAY_CONTROL

Description Variable
s – absorptance results[ABSO_S]
p – absorptance results[ABSO_P]
output direction X results[RAYOUT_DIR_X]
output direction Y results[RAYOUT_DIR_Y]
output direction Z results[RAYOUT_DIR_Z]
output Stokes, S0 results[RAYOUT_FLUX_S0]
output Stokes, S1 results[RAYOUT_FLUX_S1]
output Stokes, S2 results[RAYOUT_FLUX_S2]
output Stokes, S3 results[RAYOUT_FLUX_S3]
output Stokes, SX results[RAYOUT_FLUX_SX]
output Stokes, SY results[RAYOUT_FLUX_SY]
output Stokes, SZ results[RAYOUT_FLUX_SZ]

After unzipping the downloaded zip file, you will find the following:
• TraceProDLLs.h
header file shared with TracePro defines the array subscripts to the input and
output arrays should be included in each new Surface Property DLL

7.30 TracePro 2022 User’s Manual


Surface Properties

• \SurfacePropDll
folder that contains source, project, and workspace files as an example for
writing your own DLL.
The following steps can be used to create and use your DLL:
1. Copy the SurfacePropDll folder and its contents to a new folder.
2. Open the solution file in Microsoft Visual Studio.
3. Add your code to the source files surf.h and surf.cpp
4. Build the DLL. The name of the DLL from this solution will be surf.dll.
5. Within TracePro’s Surface Property Editor, create a new surface property. Set
the “Type:” to “Coating DLL” and browse to the DLL’s location on the disk.
6. You may now apply this surface property to any surface in a TracePro model
using the Apply properties dialog box.
7. When applying this type of surface property you must also supply an origin,
normal direction, and up direction. This will identify the local coordinate system
of the property in the model’s global coordinate system.
8. After debugging your work, move and rename the DLL. It may be moved to
any convenient location.
9. After renaming the DLL, go back and modify the surface property to identify
the new location of the DLL.

Create the Surface Property


DLL properties are created in a similar manner to standard surface properties.
Add a new property using the Add Surface Property button and set the Type to
Coating DLL. The Specular data is provided in the DLL. Scattering data may be
added separately in the property editor.

Apply Surface Property


The Apply Surface Property dialog provides additional data for DLL properties
(see Figure 7.10). An Origin, Normal Direction (normal vector) and Up Direction
(up vector) are available to orient the property to the surface. This data permits
spatially varying properties. The normal and up vectors will be transformed when
the object is rotated and the origin will be translated when the object is moved. A
User Param (user parameter) cell is also available as a storage place for data that
you want to keep with the Surface Property. A standard Windows browse button:

is placed to the right of the User Param cell in case you want to easily determine a
file location path to store in the User Param cell.

TracePro 2022 User’s Manual 7.31


Technical Reference

FIGURE 7.10 - Elliptical BSDF coordinates

API Specification for Enhanced Coating DLL


While the Enhanced Coating DLL requires programming experience from the user
it provides the following features:
• Spatial variation of surface properties including reflection, absorption, trans-
mission,
• All surface properties can be functions of wavelength, temperature, and other
parameters,
• Individual control of the Stokes vectors for rays, and
• Assign Mueller Matrices to surfaces rather than objects.
Simply said, this API allows you to enter complex surface properties through their
own C++ programming structures. It can be thought as analogous to RepTile but
rather than affecting the geometry it affects the coating properties on that surface.
This section provides a bit more understanding of how to use set up such DLLs,
but by no means is it complete - there are just too many options possible with this
API!
The following API specification identifies all function calls and parameters passed
between the main executable, TracePro, and the Enhanced Coating DLL (herein
referred to as "DLL"). This functionality requires the Expert edition of TracePro.
All references to "TracePro" within this section imply TracePro Expert.

7.32 TracePro 2022 User’s Manual


Surface Properties

The header files (*.h) constitute a key portion of this document. The header files
are shipped with TracePro in electronic form. In the event that a shipped header
file differs from the description shown in this document, the shipped header file
takes precedence since it was actually used in the compilation of the software.
Please notify Lambda of any discrepancies and this document will be updated.

Document Layout
This specification identifies and describes function calls made by TracePro into
the DLL. A syntax sheet is provided for each function, identifying and explaining
the following:
• The frequency by which the function is called by TracePro,
• The parameters passed by TracePro to each function, and
• The parameters returned by each function to TracePro.

Calling Frequencies
The following calling frequencies apply:
• Per Simulation - Functions with this frequency are called once per simulation/
analysis (hereafter called simulation). A simulation consists of two phases: an
audit phase and a raytrace phase.
• Per Wavelength - Functions with this frequency are called once per wave-
length ray trace. This occurs in a portion of the audit phase. Once the raytrace
phase begins, the raytrace proceeds one wavelength at a time. As the simula-
tion switches from one wavelength to another, this portion of the audit phase is
executed to update the model for the next wavelength to be traced.
• Per Surface - Functions with this frequency are called once for each surface in
the TracePro model. These functions are called in the audit phase of the simu-
lation.
• Per Surface Intersection -- Functions with this frequency are called each time a
ray intersects a surface with a Coating DLL type surface property on it. These
functions are called in the raytrace phase of the simulation.

Return Codes, Signals, and Constants -- TraceProDLL.h


All return codes, signals, and constants are defined in the C++ header file,
TraceProDLL.h. This header file is included when TracePro is compiled and built.
The default location is:
C:\Program Files\Lambda Research Corporation\TracePro\DLLs

DLL writers should use the definitions provided herein and not hard code numbers
when their usage is warranted.

Description of Return Codes


The return codes for functions in the DLL are broken into two categories. One set
for functions returning a double value; and another set for functions returning an
integer value. The two sets mirror each other.

Double:
• OK and no message to be output by TracePro:

TracePro 2022 User’s Manual 7.33


Technical Reference

const double COATING_DLL_RETURN_CODE_OK = (double)0;


• OK and TracePro to output message:
const double COATING_DLL_RETURN_CODE_OK_WITH_MESSAGE =
(double)1;
• Error, TracePro to output message, but keep processing:
const double COATING_DLL_RETURN_CODE_ERROR_GENERAL =
(double)2;
• Error, TracePro to output message, and stop processing:
const double COATING_DLL_RETURN_CODE_ERROR_CRITICAL = (double)3;

Integer:
• OK and no message to be output by TracePro:
const int COATING_DLL_IRC_OK = 0;
• OK and TracePro to output message:
const int COATING_DLL_IRC_OK_WITH_MESSAGE = 1;
• Error, TracePro to output message, but keep processing:
const int COATING_DLL_IRC_ERROR_GENERAL = 2;
• Error, TracePro to output message and stop processing::
const int COATING_DLL_IRC_ERROR_CRITICAL = 3;

Function: fnInitDll
Calling Frequency:
Per Surface

Function Prototype:
//Function address for TracePro random number generator
typedef double (*RAND_FN)(void);
RAND_FN random_function;

double fnInitDll(
RAND_FN address,
// the following parameters have defaults for backward
compatibility
long nUniqueSurfaceID = 0,
LPTSTR szMessage = ""
);

Description:
This is an initialization function called by TracePro to setup the random number
generator for use by the DLL. This function is also the first announcement of the
unique surface identifier. The writer of the DLL should use this function to store
this unique surface ID in a variable for use throughout the DLL.

7.34 TracePro 2022 User’s Manual


Surface Properties

Parameters:

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

Function: fnEvaluateCoating
Calling Frequency:
Per Surface Intersection

Function Prototype:
double fnEvaluateCoating(
double* input,
int input_size,
double* user,
int user_size,
double* results,
int results_size,
// the following parameters have defaults for backward
compatibility
long nUniqueSurfaceID = 0,
LPTSTR szMessage = ""
);

Description:
The fundamental communication link between TracePro and the DLL in the
evaluation function, fnEvaluateCoating, is primarily through the use of 2 arrays,
called the "input" array and the "results" array.

Parameters:
NOTE: nUniqueSurfaceID and szMessage have the same meaning as described
in the other functions.

The "input" array description:


Data flow direction: TracePro > DLL

Description Variable
Wavelength input[WAVELENGTH]
Temperature input[TEMPERATURE]
position X input[RAY_POS_X]

TracePro 2022 User’s Manual 7.35


Technical Reference

position Y input[RAY_POS_Y]
position Z input[RAY_POS_Z]
incident direction Xi input[RAY_DIR_X]
incident direction Y input[RAY_DIR_Y]
incident direction Z input[RAY_DIR_Z]
flux S0, (Stokes Vector) input[RAY_FLUX_S0]
flux S1, (Stokes Vector) input[RAY_FLUX_S1]
flux S2, (Stokes Vector) input[RAY_FLUX_S2]
flux S3, (Stokes Vector) input[RAY_FLUX_S3]
flux SX, (Stokes Vector) input[RAY_FLUX_SX]
flux SY, (Stokes Vector) input[RAY_FLUX_SY]
flux SZ, (Stokes Vector) input[RAY_FLUX_SZ]
surface normal X input[SURF_NORM_X]
surface normal Y input[SURF_NORM_Y]
surface normal Z input[SURF_NORM_Z]
n reflection side input[N_REFL_SIDE]
k reflection side input[K_REFL_SIDE]
n transmission side input[N_TRAN_SIDE]
k transmission side input[K_TRAN_SIDE]

The "results" array description:


Data flow direction: DLL > TracePro
Depending on the value assigned to the results[SIGNAL_TO_TRACEPRO], the
results array will be interpreted differently by TracePro. There are three signals
that TracePro will recognize. They are:
• COATING_DLL_SIGNAL_NONE
• COATING_DLL_SIGNAL_USE_MUELLER_MATRIX
• COATING_DLL_SIGNAL_FULL_RAY_CONTROL

1. By assigning as follows:
results[SIGNAL_TO_TRACEPRO] = COATING_DLL_SIGNAL_NONE;

TracePro will recognize the following variables in the results array:


Description Variable
s - absorptance results[ABSO_S]
p - absorptance results[ABSO_P]
s - reflectance results[REFL_S]
p - reflectance results[REFL_P]
s - transmittance results[TRAN_S]

7.36 TracePro 2022 User’s Manual


Surface Properties

p - transmittance results[TRAN_P]
Phase reflection [deg] results[PHAS_R]
Phase transmission [deg] results[PHAS_T]

2. By assigning as follows:
results[SIGNAL_TO_TRACEPRO]=COATING_DLL_SIGNAL_USE_MUELLER_MATRIX;

TracePro will also recognize the following variables in the results array (the above
variables for case 1 are also used):
Description: 16 Mueller Matrix components for reflection
Variable: results[REFL_MM_xy] for x -> 0 to 3 ; y-> 0 to 3

Description: 16 Mueller Matrix components for transmission


Variable: results[TRAN_MM_xy] for x -> 0 to 3 ; y-> 0 to 3

3. By assigning as follows:
results[SIGNAL_TO_TRACEPRO] =COATING_DLL_SIGNAL_FULL_RAY_CONTROL;

TracePro will recognize the following variables in the results array:


Description Variable
s - absorptance results[ABSO_S]
p - absorptance results[ABSO_P]
output direction X results[RAYOUT_DIR_X]
output direction Y results[RAYOUT_DIR_Y]
output direction Z results[RAYOUT_DIR_Z]
output Stokes, S0 results[RAYOUT_FLUX_S0]
output Stokes, S1 results[RAYOUT_FLUX_S1]
output Stokes, S2 results[RAYOUT_FLUX_S2]
output Stokes, S3 results[RAYOUT_FLUX_S3]
output Stokes, SX results[RAYOUT_FLUX_SX]
output Stokes, SY results[RAYOUT_FLUX_SY]
output Stokes, SZ results[RAYOUT_FLUX_SZ]

When TracePro is sent the new signal:


COATING_DLL_SIGNAL_FULL_RAY_CONTROL,

the 10 quantities (for direction and flux) are used in conjunction with two existing
array elements, ABSO_S and ABSO_P, to control the next ray node to propagate
from the surface.

TracePro 2022 User’s Manual 7.37


Technical Reference

Surface absorption will occur based on the values of the ABSO_S and ABSO_P
array elements. This will yield a convenient way to terminate rays by setting these
to unity.
Only one ray is generated from the surface. Energy conservation, if desired, is
controlled by the writer of the DLL. The energy conservation equation is:
results[RAYOUT_FLUX_S0] ==
input[RAY_FLUX_S0] *
( 1 - 0.5 * results[ABSO_S] - 0.5 * results[ABSO_P] )

The writer of the DLL assumes the responsibility of supplying a valid Stokes
vector. TracePro will not perform any error checking for this. A valid Stokes
vector must satisfy these conditions:
results[RAYOUT_FLUX_S0] >= 0.0

and
(results[RAYOUT_FLUX_S0])^2 >=(results[RAYOUT_FLUX_S1])^2 +
(results[RAYOUT_FLUX_S2])^2 +
(results[RAYOUT_FLUX_S3])^2

Function: fnAnnounceOMLPath
Calling Frequency:
Per Simulation

Function Prototype:
int fnAnnounceOMLPath(
LPCTSTR szPath,
long nUniqueSurfaceID,
LPTSTR szMessage
);

Description:
This function announces the full filename, including the path, of the OML file. If
the simulation is run before the file is saved, the empty string is sent to the DLL.

Parameters:

szPath:
full filename of OML file including path
Data flow direction: TracePro > DLL

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

7.38 TracePro 2022 User’s Manual


Surface Properties

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

Function: fnAnnounceDataDirectory
Calling Frequency:
Per Simulation

Function Prototype:
int fnAnnounceDataDirectory(
LPCTSTR szDataDir,
long nUniqueSurfaceID,
LPTSTR szMessage
);

Description:
This function announces the data directory to the DLL. In TracePro (3.3.X +), this
is entered through the View|Customize menu selection.

Parameters:

szDataDir:
data directory specified to TracePro
Data flow direction: TracePro > DLL

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

Function: fnAnnounceSurfaceInfo
Calling Frequency:
Per Surface

Function Prototype:
int fnAnnounceSurfaceInfo (
LPCTSTR szObjectName,
LPCTSTR szSurfaceName,
LPCTSTR szSurfacePropertyCatalog,

TracePro 2022 User’s Manual 7.39


Technical Reference

LPCTSTR szSurfacePropertyName,
LPCTSTR szCustomizedSurfaceParameter,
long nUniqueSurfaceIDLPTSTR szMessage);

Description:
This function announces various surface information to the DLL.

Parameters:

szObjectName:
name of this surface's object
Data flow direction: TracePro > DLL

szSurfaceName:
the surface name
Data flow direction: TracePro > DLL

szSurfacePropertyCatalog:
the catalog in which this surface's surface property resides
Data flow direction: TracePro > DLL

szSurfacePropertyName:
the name of the surface property applied to this surface
Data flow direction: TracePro > DLL

szCustomizedSurfaceParameter:
customized surface parameter entered from the Apply Properties dialog box when
applying the surface property
Data flow direction: TracePro > DLL

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

Function: fnAnnounceLocalBoundingBox
Calling Frequency:
Per Surface

Function Prototype:
int fnAnnounceLocalBoundingBox(

7.40 TracePro 2022 User’s Manual


Surface Properties

double* LocalBoundingBox,
long nUniqueSurfaceID,
LPTSTR szMessage
);

Description:
This function announces the three orthogonal dimensional extents of a bounding
box in the local coordinate system specified by the user.

Parameters:

LocalBoundingBox:
LocalBoundingBox is an array of 6 double values which contains the X, Y, and Z-
dimension limits of local bounding box. These limits are with respect to the
coordinate system defined by the origin, normal vector, and up vector when
applying the surface property to this surface. The six individual elements of the
array are obtained as follows:
LocalBoundBox[BOX_XMIN],
LocalBoundBox[BOX_XMAX],
LocalBoundBox[BOX_YMIN],
LocalBoundBox[BOX_YMAX],
LocalBoundBox[BOX_ZMIN], and
LocalBoundBox[BOX_ZMAX]

Data flow direction: TracePro > DLL

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

Function: fnAnnounceRaytraceStart
Calling Frequency:
Per Simulation

Function Prototype:
int fnAnnounceRaytraceStart(
long nUniqueSurfaceID,
LPTSTR szMessage
);

TracePro 2022 User’s Manual 7.41


Technical Reference

Description:
This function announces the start of the raytrace.

Parameters:

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

Function: fnAnnounceWavelengthStart
Calling Frequency:
Per Wavelength

Function Prototype:
int fnAnnounceWavelengthStart(
double wavelength,
long nUniqueSurfaceID,
LPTSTR szMessage
);

Description:
This function announces the start of the raytrace for a particular wavelength

Parameters:

wavelength:
the wavelength, in microns, that will be raytraced next
Data flow direction: TracePro > DLL

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

7.42 TracePro 2022 User’s Manual


Surface Properties

Function: fnAnnounceWavelengthFinish
Calling Frequency:
Per Wavelength

Function Prototype:
int fnAnnounceWavelengthFinish(
double wavelength,
long nUniqueSurfaceID,
LPTSTR szMessage
);

Description:
This function announces the completion of the raytrace for a particular
wavelength.

Parameters:

wavelength:
the wavelength, in microns, that was just raytraced
Data flow direction: TracePro > DLL

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

Function: fnAnnounceRaytraceFinish
Calling Frequency:
Per Simulation

Function Prototype:
int fnAnnounceRaytraceFinish(
int nStatus,
long nUniqueSurfaceID,
LPTSTR szMessage
);

Description:
This function announces the completion of the raytrace.

TracePro 2022 User’s Manual 7.43


Technical Reference

Parameters:

nStatus:
the raytrace finishing status
one of the following const values will be sent by TracePro:
const int COATING_DLL_RAYTRACE_FINISH_OK = 0;
const int COATING_DLL_RAYTRACE_FINISH_USER_CANCEL = 1;
const int COATING_DLL_RAYTRACE_FINISH_CATCH_EXCEPTION = 2;
const int COATING_DLL_RAYTRACE_FINISH_CRITICAL_ERROR_FROM_DLL =3;

Data flow direction: TracePro > DLL

nUniqueSurfaceID:
unique surface ID established during the audit phase of the simulation
Data flow direction: TracePro > DLL

szMessage:
message sent to TracePro's message window if the return code is non-zero
Data flow direction: DLL > TracePro

Example of Enhanced Coating DLL


Provided here is an example of an enhanced coating DLL. It is a variable
transmission (and reflection) filter as a function of radial position. The equations
that governs the transmission (T) and reflection (R) are

T = 1 – r  r max and (7.37)

R = 1 – T = r  r max , (7.38)

where r is the local radius of the ray on the applied surface and rmax is maximum
radius of the surface, which is hard-coded to a value of 5 as shown below.
The programming of interest in the DLL is:

////////////////////////////////////
// End of example
////////////////////////////////////
SURF_API double fnEvaluateCoating(
double*input,
int input_size,
double*user,
int user_size,
double*results,
int results_size
)

7.44 TracePro 2022 User’s Manual


Surface Properties

{
double result_val = 0;

// zero-out the results array


memset(results,0,sizeof(double)*results_size);
results[SIGNAL_TO_TRACEPRO] = COATING_DLL_SIGNAL_NONE;

double x = input[RAY_POS_X];
double y = input[RAY_POS_Y];
double r = sqrt( x*x + y*y );
double rMax = 5.0;
double tran = 1.0 - r/rMax;

if( tran < 0.0 )


tran = 0.0;

results[TRAN_S] = results[TRAN_P] = tran;


results[REFL_S] = results[REFL_P] = 1.0 - tran;

return result_val;
}
////////////////////////////////////
// End of example
////////////////////////////////////

This example can be found in the technical support section of


www.lambdares.com, under TracePro>Examples. To use this OML example you
must import the Surface Property within the above folder. Note that you must set
up a Surface Property using the Define|Edit Property Data|Surface
Properties… Editor if you create new DLLs. The process is the same except
select for Type Coating DLL. Additionally, when you apply this property to a
surface you must set its Property Orientation, including Origin (set to (0, 0, 0) in
this case), Normal Direction (set to (0, 0, 1) in this case) and Up Direction (set to
0, 1, 0) in this case). See Figure 7.11 for a screen capture of the system and
Figure 7.12 for the Apply Properties dialog for Filter|Variable. Figure 7.13 shows
the reflection results, while Figure 7.14 shows the transmission results when a
circular grid of over 30,000 rays is traced.

TracePro 2022 User’s Manual 7.45


Technical Reference

FIGURE 7.11 - Layout of the example for Enhanced Coating DLL.

FIGURE 7.12 - Apply Properties dialog for the Filter|Variable surface.

7.46 TracePro 2022 User’s Manual


Surface Properties

FIGURE 7.13 - Reflection results for the system of Figure 7.11.

FIGURE 7.14 - Transmission results for the system of Figure 7.11.

TracePro 2022 User’s Manual 7.47


Technical Reference

Angles Measured in Substrate

When should I use Angles measured in Substrate?


The selection for the Reference Material when applying a Surface Property has
two choices: Angles measured in Air, and Angles measured in Substrate. Most of
the time when you define a Surface Property, the coefficients such as reflectance,
transmittance, and BSDF are measured “in air.” This means that a flat sample is
placed in a spectrometer (for reflectance or transmittance) or a scatterometer (for
BSDF). When evaluating the property with a ray incident from inside the material,
TracePro scales the angle according to Snell’s Law, as it must. Because
properties have incident angles only up to 90 degrees, an angle of incidence
inside the material beyond the critical angle of the material cannot be modeled.
TracePro will extrapolate the property data in this case.
If you have data, either measured, or more typically modeled in, for example, a
coating design software, you can build the property based on the angles of
incidence in the material. Then when you apply the property, use the Angles
measured in Substrate selection, being careful that the material applied the object
that owns the surface is the same one that was used in defining the property.
This also applies to the BSDF values in a Table BSDF property. If you make a
property for Angles measured in Substrate application, you must obtain BSDF
data (again, from measurements or calculations) for angles inside the material.

Background and Theory


When a ray refracts into a dielectric medium, it obeys Snell’s law,

n1 sin 1  n2 sin  2 .
This is very conveniently represented in β space as
 
n1 1  n2  2
where β1 and β2 are the β vectors corresponding to the incident and refracted
directions, respectively. The wavelength of light is shorter in a dielectric medium,
nλn = λ, where λn is the wavelength in the medium and λ is the wavelength in
vacuum. The scattering direction
  
   0  

is related to the wavelength in a way similar to the grating equation. The grating
equation for a reflection grating can be written
 m
 
 ,
where Λ is the spatial wavelength of the grating grooves and values of m
represent the diffracted orders. In fact, the physics for scattering of light same is
the same as that for diffraction by a grating. For a polished surface, we have only
the m = 1 order of scattered light, and we can say that

7.48 TracePro 2022 User’s Manual


Surface Properties

 
    f

where Λ is the spatial wavelength of the power spectral density (PSD) of surface
roughness, and f = 1/Λ is the spatial frequency. For the same PSD, then, the
scattering values || are smaller by a factor of n in the medium than they are in
air. For example, suppose a ray enters a dielectric medium with a slightly rough
(i.e. polished) surface. The surface roughness can be characterized by a PSD as
a function of frequency. Inside the material, the relation above becomes

 
 n  n f 
n
which means that light that would scatter at a given beta (or ||) for a frequency f
inside the medium will scatter at a beta that is a factor of n smaller in air. In short,
scattered light obeys Snell’s law. Furthermore, the maximum spatial frequency in
the PSD that can cause scattered light in air for light at normal incidence is

1
f max 
,
and in the medium the highest spatial frequency is

1 n
n
f max    nf max
n  .

Properties Measured in Air


Normally, BSDFs are measured in air from a planar substrate. This holds true for
BTDFs as well as BRDFs. When curved substrates are measured, (e.g. a finished
mirror) the measurement equipment is modified to account for the focusing of the
surface.
Suppose we normally illuminate a planar sample, as shown in Figure 7.15, which
has scattering on the first surface but no scatter on the second surface. Scattered
rays that occur at beta values corresponding to spatial frequencies between fmax
and nfmax are trapped inside the substrate due to total internal reflection (TIR). If
we measure the BTDF by scanning a detector on the far side of the substrate, the
beta values are off by a factor of n. Specifically,

 air  n n
where βair represents values of beta measured in air and βn those in the medium.
In order to use these measurements in TracePro, we must scale the beta value by
n before evaluating the BTDF. Furthermore, light scattered at β values larger than
1/n in the medium will not be measured. A calculation of the integrated scatter will
not include this scatter, and the total scattered light will be underestimated.

TracePro 2022 User’s Manual 7.49


Technical Reference

FIGURE 7.15 - Scattering from BTDF on the first surface of a planar


substrate immersed in air. Rays scattered at  inside the substrate
emerge at n. Rays scattered at  > 1/n in the substrate are trapped by
TIR.

When light scatters from the first surface according to the BTDF as in Figure 7.15,
the amount of flux scattered into a differential solid angle dΩn in the medium is

 s  BTDFn (  n )d n
.
From Snell’s law we know that after emerging from the medium, the same
scattered flux is spread through a solid dΩair where

d air  n 2 d n .

This means that the measured BTDF is lower by a factor of n2 than the actual
BTDF. Now we have all the information we need to relate the true BTDF to the
BTDF measured in air from a planar substrate,
 
BTDFn (  n )  n 2 BTDFair (n  n )
.
This relation is general, i.e. it also applies to BRDF, so we can write
 
BSDFn (  n )  n 2 BSDFair (n  n )
.
Again, the relation above applies only to measurements made from a planar
substrate. It is possible to construct a measurement that does not suffer from the
distortion of the solid angle. Consider the construction in Figure 7.16, in which the
substrate is no longer planar, but is hemispherical, with the radius of the sphere

7.50 TracePro 2022 User’s Manual


Surface Source Properties

much greater than illuminating beam diameter. Rays scattered at the planar
surface are incident normal to the hemispherical surface, so the solid angle
remains the same.

FIGURE 7.16 - One way to practically make a measurement “in the


substrate” is to make a hemispherical sample.

Finally, we note that if in the measurement of the BTDF occurs on the second
surface in Figure 7.16, there is no scaling needed; the measurements are being
made in the medium into which the scattered light is propagating, namely air.

Surface Source Properties


TracePro has a Surface Source Property database that allows you to create and
use Surface Source Properties, or use properties that are supplied with TracePro.
The purpose of the Surface Source Property is to allow you to accurately model
real sources, with detailed angular and spectral behavior. When you create a new
Surface Source Property, you can choose from the following spectral and angular
types.

Spectral Types Angular Types


Rectangular Lambertian
Gaussian Uniform
Solar Gaussian
Table Solar
Table

TracePro 2022 User’s Manual 7.51


Technical Reference

You can choose any combination of spectral and angular type. The Spectral type
and Angular type are independent of each other, unless you choose Table for both
types. If you need to model a source that has different angular shape for different
wavelengths (or different spectrum for different emission angles), then you need
to create a Table Wavelength-Table Angle source. This choice will allow you to
enter a separate table of emissivity versus angles for each wavelength.
Except for the Table-Table combination, the spectral and angular dependence are
separable. In mathematical terms,
S      = f 1   f 2    

for all combinations except Table Wavelengths with Table Angles.This means that
the same angular dependence applies to all wavelengths. The exception to this is
the Table Wavelengths - Table Angles combination, which allows you complete
flexibility to change the angular dependence with wavelength.
To use a Surface Source Property to define a surface source, select Emission
Type = Source Property in the Apply Properties dialog box, Surface Source tab.
Remember that the Property specifies the behavior of the source, but you can still
choose what wavelengths will be traced to represent, or sample, the source.
These wavelengths are entered in the Apply Properties dialog box, Surface
Source tab.

Spectral types

Rectangular
To make a Rectangular Spectral Type surface property, you specify a minimum
wavelength and a maximum wavelength. The emissivity is equal to the value in
the table for wavelengths between the minimum and maximum, and zero
otherwise.

7.52 TracePro 2022 User’s Manual


Surface Source Properties

FIGURE 7.17 - Rectangular Spectrum with Min wavelength = 1, Max


wavelength = 2.

Gaussian
To make a Gaussian Spectral Type surface property, you specify a Central
wavelength and a 1/e2 half-width wavelength. The spectral emissivity has the
shape
   –  central  
2

S    = exp  – 2 ------------------------------
- 
 1 
 --
2
- 

An example Gaussian spectrum with Center wavelength = 1 and half-width = 0.1


is shown in Figure 7.18.

TracePro 2022 User’s Manual 7.53


Technical Reference

FIGURE 7.18 - Gaussian Spectrum with Center wavelength = 1 and 1/e2


wavelength = 0.1. The red vertical lines show the half-width
wavelengths with emissivity value of 1/e2 = 0.1353.

Solar
The Solar Spectral Type uses a standard solar spectrum: ASTM E-490-00. It is
the solar spectral irradiance incident on the Earth's upper atmosphere in SI units
of W/m2-m. According to the standard, the total insolation irradiance is 1366.1
W/m2. Therefore, when you make a Solar Spectral Type property, it is a
Radiometric Irradiance source with Emission = 1366.1 W/m2. The spectrum
extends from 0.1195 um to 1000 um. A portion of the spectrum is shown in Figure
7.19.

7.54 TracePro 2022 User’s Manual


Surface Source Properties

FIGURE 7.19 - A portion of the ASTM E-490-00 Solar Spectrum, from


wavelength 0 to 4 m.

Table
To make a Table Spectral Type surface property, you add wavelengths to the table
using the Add button in the Data Points section of the Surface Source Property
Editor. As you add new wavelengths, new rows will appear in the table, so that
you can enter a different emissivity value for each wavelength. When the property
is applied to a Surface Source using the Apply Properties dialog box, wavelengths
entered there are used to linearly interpolate between the wavelengths in the
property. Applied wavelengths that are outside the wavelengths in the property will
have emissivity equal to zero.

Angular Types

Lambertian
A Lambertian Angular Type surface source property has the emissivity profile
E    = cos 

where  is the angle between the surface normal and the emission direction. The
only entries required are the half angle and emission. The Lambertian pattern is
truncated by a cone with the half angle you enter. The Lambertian pattern is
important because an ideal blackbody source emits in a Lambertian pattern, and
many real incandescent, or thermal, surface sources emit in a very nearly
Lambertian pattern.

TracePro 2022 User’s Manual 7.55


Technical Reference

Uniform
A Uniform Angular Type surface source property does not vary with angle. The
only entries required are the half angle and emission value. The pattern is
truncated by a cone with the half angle you enter.

Gaussian
To make a Gaussian Angular Type surface property, you specify x and y 1/e2 half-
width angles, in degrees. The spectral emissivity has the shape
 sin  x 
2
 sin  y 
2
 
S   x  y  = cos  exp – 2 ------------- exp – 2 -------------
 sin x 1   sin y 1 
 --- 
2
 --- 
2

where x and y are angles from the surface normal in the local x-z and y-z
planes, and  is the polar angle from the surface normal, defined by sin2 = sin2x
+ sin2y. When you apply a Gaussian Angle Surface Source Property to a surface
source, you must specify an Up Vector to orient the emission pattern. The Up
Vector specifies the local y axis, and the local z axis is along the surface normal.
The local x axis completes a right-handed coordinate system. An example
Gaussian Angle distribution with half-width = 30 (along one axis) is shown in
Figure 7.20.

FIGURE 7.20 - Gaussian Angular Type with 1/e2 angle = 30 degrees. The red
lines show the half-width angle with emissivity value of cos30/e2 =
0.1172.

Solar
The Solar Angle type models the variation of the sun’s brightness with angle. The
“disk” of the sun is dimmer at the edge (limb darkening). Tha data for this angular
dependence is taken from Astrophysical Quantities, by C.W. Allen, The Athone

7.56 TracePro 2022 User’s Manual


Mueller Matrices and Stokes Vectors

Press, University of London, Second Edition (1955). The limb darkening depends
on wavelength as well.

Table
To make a Table Angular Type surface property, you add polar and azimuth
angles to the table using the Add button in the Data Points section of the Surface
Source Property Editor. As you add new angles, new rows will appear in the table,
so that you can enter a different emissivity value for each pair of angles. When
rays are generated from the Surface Source, a continuous distribution is created
by linearly interpolating between the angles in the table.

Mueller Matrices and Stokes Vectors


TracePro uses the Mueller matrix-Stokes vector method of representing the
polarization state of light and calculating the interaction between light and
polarizing elements.
For your convenience, we have tabulated the Stokes vectors and Mueller matrices
for several standard configurations.
TABLE 7.3. Stokes vectors of selected polarization states (flux = 1).

Polarization state Stokes vector


Linear, parallel to x axis
1
1
0
0
Linear, parallel to y axis
1
–1
0
0
Linear, 45 degrees to the x axis
1
0
1
0
Linear, 135 degrees to the x axis
1
0
–1
0
General linear, at angle  to the x axis
1
cos 2 
sin 2
0

TracePro 2022 User’s Manual 7.57


Technical Reference

Circularly polarized, right-handed


1
0
0
1
Circularly polarized, left-handed
1
0
0
–1
General elliptical, ellipse at angle  to x
axis, phase or ellipticity =  1
cos 2 cos 2
cos 2 sin 2
sin 2
Unpolarized (Randomly polarized)
1
0
0
0

TABLE 7.4. Mueller matrices for selected polarizing components

Component description Mueller matrix


Linear polarizer with transmission axis along
the x axis (horizontal polarizer) 0.5 0.5 0 0
0.5 0.5 0 0
0 0 0 0
0 0 0 0

Linear polarizer with transmission axis along


the y axis, i.e. at 90 degrees to the x axis (ver- 0.5 – 0.5 0 0
tical polarizer) – 0.5 0.5 0 0
0 0 0 0
0 0 0 0

Linear polarizer with transmission axis at 45


degrees to the x axis 0.5 0 0.5 0
0 0 0 0
0.5 0 0.5 0
0 0 0 0

Linear polarizer with transmission axis at 135


degrees to the x axis 0.5 0 – 0.5 0
0 0 0 0
– 0.5 0 0.5 0
0 0 0 0

7.58 TracePro 2022 User’s Manual


Mueller Matrices and Stokes Vectors

Right circular polarizer


0.5 0 0 0.5
0 0 0 0
0 0 0 0
0.5 0 0 0.5

Left circular polarizer


0.5 0 0 – 0.5
0 0 0 0
0 0 0 0
– 0.5 0 0 0.5

Linear quarterwave retarder with fast axis


along the x axis 1 0 0 0
0 1 0 0
0 0 0 1
0 0 –1 0

Linear quarterwave retarder with fast axis


along the y axis, i.e., at 90 degrees to the x 1 0 0 0
axis 0 1 0 0
0 0 0 –1
0 0 1 0

Linear quarterwave retarder with fast axis at 45


degrees to the x axis 1 0 0 0
0 0 0 –1
0 0 1 0
0 1 0 0

Linear quarterwave retarder with fast axis at


135 degrees to the x axis 1 0 0 0
0 0 0 1
0 0 1 0
0 –1 0 0

Unity matrix (Does nothing)


1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1

TracePro 2022 User’s Manual 7.59


Technical Reference

TABLE 7.4 (cont.). Mueller matrices for selected polarizing components

Component description Mueller matrix


Linear halfwave retarder with fast axis at 0 or
90 degrees to the x axis 1 0 0 0
0 1 0 0
0 0 –1 0
0 0 0 –1

Linear halfwave retarder with fast axis at 45


or 135 degrees to the x axis 1 0 0 0
0 –1 0 0
0 0 1 0
0 0 0 –1

Circular halfwave retarder right- or left-


handed 1 0 0 0
0 –1 0 0
0 0 –1 0
0 0 0 1

TABLE 7.5. General Mueller matrices for selected types of components

Component description Mueller Matrix


Compensator: introduces a phase differ-
ence of 2 between the x and y compo- 1 0 0 0
nents 0 1 0 0
0 0 cos 2 – sin 2
0 0 sin 2 cos 2
Rotator: rotates the plane of polarization
counterclockwise through an angle  1 0 0 0
about the z axis 0 cos 2 – sin 2 0
0 sin 2 cos 2 0
0 0 0 1
Linear polarizer with transmission axis
oriented at an angle  to the x axis 0.5 0.5 cos 2 0.5 sin 2 0
0.5 cos 2 2
0.5 cos 2 0.5 sin 2 cos 2 0
0.5 sin 2 0.5 sin 2 cos 2 0.5 sin2 2 0
0 0 0 0

7.60 TracePro 2022 User’s Manual


Bulk Scattering

Bulk Scattering Standard Expert

When a ray enters an object that has bulk scattering, the ray propagates a
random distance, then the direction of the ray is deviated, similar to the way rays
are diffracted by an aperture in TracePro. Importance sampled rays may also be
generated at your option. The ray deviation and importance sampled flux are
governed by a probability distribution similar to a BSDF, but slightly different.
Whereas the BSDF is defined as the scattered radiance per unit incident
irradiance, the scattering distribution function or SDF is defined as the scattered
intensity per unit incident flux,

I  r̂ 
SDF = ------------ . (7.39)

In addition, the SDF is independent of the direction of incidence.

Henyey-Greenstein Phase Function


One SDF that has been implemented in TracePro is after a paper by Jacques and
Wang1 that describes scattering in biological tissue and has the form

2
1–g
SDF = p    = ----------------------------------------------------------
32
-, (7.40)
2
4  1 + g – 2g cos  
where g is called the anisotropy factor, and g can take on values between –1 and
1. When g is positive, rays are scattered more in the forward direction, and when
g is negative, they are scattered more in the backward direction. When g is zero,
the scattering is isotropic, i.e. the same in all directions. Figure 7.21 shows an
example scattering distribution function for g = 0.5.

FIGURE 7.21 - Example scattering distribution with g = 0.5. Zero is the


forward direction

1. S. L. Jacques and L.-H. Wang, “Monte Carlo modeling of light transport in tissues,” in Optical Thermal Response of Laser
Irradiated Tissue, edited by A. J. Welch and M. J. C. van Gemert (Plenum Press, New York, 1995), pp. 73-100.

TracePro 2022 User’s Manual 7.61


Technical Reference

Gegenbauer Phase Function


Another bulk scattering phase function offered in TracePro is the Gegenbauer2,3
phase function. The Henyey-Greenstein function is actually a special case of the
Gegenbauer phase function. The Gegenbauer function is

SDF = f    = K  1 + g 2 – 2g cos   –  + 1  (7.41)


where

2 2
1 – g 
K = g ----------------------------------------------------------
2
- (7.42)
1 + g –  1 – g2  
and

  –1  2 , g  1 (7.43)
The Henyey-Greenstein phase function is a special case of the Gegenbauer
phase function when  = 1/2.

Scattering Coefficient
When a ray enters a scattering medium, it propagates a random distance x
governed by the probability distribution

–s x
P  x dx = e dx , (7.44)
where s is called the scattering coefficient. The inverse of the scattering
coefficient is the mean free path of the ray in the material. When a ray enters a
piece of material that is thin compared to the mean free path, it is likely to pass
through the material without being scattered. Conversely, if the material is thick
compared to the mean free path, the ray is almost certain to scatter within the
material. When a strong scattering coefficient is combined with a strong
absorption coefficient, rays will be only weakly transmitted through the material.

Using Bulk Scattering in TracePro


In order to simulate bulk scattering in TracePro, select an object in which you wish
scattering to occur and apply a material property using the Apply Properties dialog
box. Then apply a bulk scattering model to the object. Finally, you can apply
importance sampling to the object optionally in a way that is like surface
importance sampling.
To define new bulk scattering models, open the bulk scattering model editor.
Create a new scattering property and add a new wavelength entry at the desired
wavelength. Enter values for g (the anisotropy factor) and s, the scattering
coefficient. The units for s are 1/mm, (i.e. inverse millimeters). Most bulk
scattering materials also have some bulk absorption, so you need to define a

2. L.O. Reynolds and N.J. McCormick, “Approximate two-parameter phase function for light scattering,” J.O.S.A. 70, 1206
(1980).
3. A.N. Yaroslavsky, I.V. Yaroslavsky, T. Goldbach, and H.-J. Schwarzmaier, “Influence of the Scattering Phase Function
Approximation on the Optical Properties of Blood Determined from the Integrating Sphere Measurements,” J. Biomed. Opt., 4,
47 (1999).

7.62 TracePro 2022 User’s Manual


Bulk Scattering

material property with the proper bulk absorption coefficient and apply it to your
scattering object.

User Defined Bulk Scatter Expert

TracePro Expert provides new functionality to define phase functions for Bulk
Scattering through compiled Dynamic Link Libraries (DLLs). Data from TracePro
is passed into the DLL during raytrace. The DLL calculates a result, which is
passed back to TracePro and used to scatter the ray. The Bulk Scatter Editor is
used to select the desired DLL and to add user parameter data to control the
calculations performed in the DLL. The TracePro random number function is
accessible through the DLL initialization

Using Scatter DLLs


Using a bulk scatter phase function from a DLL is similar to using any existing
Bulk Scatter property. The TracePro Bulk Scatter editor is opened and allows the
appropriate user compiled DLL to be selected and for user parameters to be
entered. The parameter data along with the DLL information is stored in the
TracePro property database.
A new property entry is made by pressing the Add Bulk Scatter button in the Bulk
Scatter property editor. Several scattering types are available including User DLL.
The DLL name with its location is entered in the DLL Name edit box. The Browse
button may be user to navigate the computer's hard disk to locate the appropriate
file. The spreadsheet rows allow user data to be added for use by the DLL during
the raytrace. Each row allows six (6) coefficients with a wavelength. The data
however, is passed to the DLL in its entirety and does not use the wavelength data
as such.

Required DLL Functions called from TracePro


fnInitDll

Action: Initialize DLL


Syntax: BULK_API double fnInitDll(RAND_FN address)
Arg Types: address RAND_FN
Returns: double (ignored by TracePro)
Errors: An error will be printed to the Macro Window if the function fails or does not exist in the
DLL.
Description: The Initialization function will pass in the address of the TracePro random number
generator. Any other initialization may be performed done here. This routine is called after
the DLL is loaded by TracePro
Limitations: Not applicable
Example:

// This initializes the DLL


BULK_API double fnInitDll(RAND_FN address)
{
random_function = address;
return (double) 1.0;
}

TracePro 2022 User’s Manual 7.63


Technical Reference

fnMeanFreePath

Action: Return the mean free path.


Syntax: BULK_API double fnMeanFreePath(double wave, double temp, double rindex, double
bulkabso, int num, double *coef);
Arg Types: wave double
temp double
rindex double
bulkabso double
num integer
coef double array
Returns: double
Errors: An error will be printed to the Macro Window if the function fails or does not exist in the
DLL.
Description: Calculate the mean free path as the inverse of the scattering coefficient.
Limitations: Not applicable
Example:

// This returns the mean free path


BULK_API double fnMeanFreePath(double wave,
double temp,
double rindex,
double bulkabso,
int num,
double *coef)
{
if ( coef == NULL )
return (double) 1.0;

if ( coef[3] > 0 )
return 1.0 / coef[3];
return 1.0;
}

fnEvaluateBSDF

Action: Return the value of the phase function for the input polar scattering angle.
Syntax: BULK_API double fnEvaluateBSDF(double wave, double temp, double rindex, double
bulkabso, int num, double *coef, double cos_alpha);
Arg Types: wave double
temp double
rindex double
bulkabso double
num integer
coef double array
cos_alpha double
Returns: double
Errors: An error will be printed to the Macro Window if the function fails or does not exist in the
DLL.
Description: During importance sampling, TracePro must evaluate the phase function to compute the flux
assigned to each importance sampled ray. This function returns the phase function evaluated in
the direction corresponding to the given polar angle. TracePro passes the cosine of the polar
angle as the last argument (cos_alpha).

7.64 TracePro 2022 User’s Manual


Bulk Scattering

Limitations: Not applicable


Example:
// Evaluate the phase function for a particular polar angle alpha.
// This is needed for computing the flux of importance sampled
rays.
BULK_API double fnEvaluateBSDF(double wave,
double temp,
double rindex,
double bulkabso,
int num,
double *coef,
double cos_alpha)
{
double result = 0;

if ( coef == NULL )
return (double) result;

double g = coef[2];
double g2 = g * g;
double cos_temp;

if ( (g < -1.0) || (g > 1.0) )


{
// Error condition
result = 0.0;
}
else if ( fabs(g) < LF_ROUNDOFF_TOL )
result = 1.0 / (4.0 * PI);
else
{
cos_temp = 1.0 + g2 - 2.0 * g * cos_alpha;
// There is an extra factor of 1/TWOPI to correctly
// normalize the bsdf (really sdf)
// compared to the Wang and Jacques paper. Their formula
// (eq. 14) is used only for deriving the
// polar c.d.f., because they never heard of importance
// sampling. Requiring that the integral
// of the probability distribution over a sphere is equal
// to one produces the extra factor of 1/TWOPI.
result = ( 1.0 - g2 )/( TWOPI * 2.0 * pow( cos_temp, 1.5 ) );
}
return (result);
}

TracePro 2022 User’s Manual 7.65


Technical Reference

fnScatterDirection

Action: Returns the cosine of the polar scattering angle and the azimuth angle in the argument phi.
Syntax: BULK_API double fnScatterDirection(double wave, double temp, double rindex, double
bulkabso, int num, double *coef, double phi);
Arg Types: wave double
temp double
rindex double
bulkabso double
num integer
coef double array
phi double pointer
Returns: double, and double pointer in phi
Errors: An error will be printed to the Macro Window if the function fails or does not exist in the
DLL.
Description: During ray tracing, the direction of a randomly scattered ray is calculated by this function. This
function calculates the cosine of the polar scattering angle where a value of 1.0 is along the
original ray direction and -1.0 reverses the ray direction. The azimuth scattering angle is then
calculated about the ray direction and passed back to TracePro as phi.
Limitations: Not applicable
Example:

// This returns the cosine of the polar scatter alpha and the
azimuth angle in the argument phi
BULK_API double fnScatterDirection(double wave,
double temp,
double rindex,
double bulkabso,
int num,
double *coef,
double *phi)
{
double cos_theta = 1.0;

*phi = 0.0;

if ( coef == NULL )
return (double) cos_theta;

double g = coef[2];
double g2 = g * g;
double cos_temp;

// The expression below is cos(theta) as a function of the


cumulative distribution function (c.d.f.)
// derived from the Henyey-Greenstein phase function.
// This expression is obtained by computing the c.d.f. as a
function of theta, then solving for theta.

7.66 TracePro 2022 User’s Manual


Bulk Scattering

// The c.d.f. is the definite integral over alpha from 0 to theta


of the phase function.
// To get a random value of theta, choose a random number for the
c.d.f., then evaluate theta as is done below.
if ( fabs(g) < SMALLANGLE )
cos_theta = 2.0*frand() - 1.0;
// isotropic scattering, i.e. g = "anisotropy" coefficient
else
{
// theta is the same as alpha in tissue scattering notes
cos_temp = (1.0-g2) / (1.0 - g + 2.0*g*frand());
cos_theta = (0.5/g) * ( 1.0 + g2 - ( cos_temp * cos_temp ) );
}
// Choose a uniform random number for the azimuth (phi)
direction, as the Henyey-Greenstein phase function
// is rotationally symetric about the direction of incidence.
*phi = frand() * TWOPI;
return (double) cos_theta;
}

Common Arguments passed from TracePro

wave current raytrace wavelength


temp current raytrace temperature
rindex refractive index on the object as defined by the applied Material Property
bulkabso bulk absorption for the object as defined by the applied Material Property
num number of elements in the coef array
coef array of user data defined in the spreadsheet area of the Bulk Scatter Editor
Each function takes the current wavelength (wave), temperature (temp), refractive index
(rindex), bulk absorptance (bulkabso), coefficient count (num) and coefficient array (coef). The
coefficient array has 8 elements for each count in num. The Temperature is currently passed as
0.0 for all rows.

Bulk Scattering Editor where the array elements are


coef[0] = temp, (First Editor Row)
coef[1] = wave,
coef[2] = Coeff 0
coef[3] = Coeff 1
coef[4] = Coeff 2
coef[5] = Coeff 3
coef[6] = Coeff 4
coef[7] = Coeff 5
coef[8] = temp, (Second Editor Row)
coef[9] = wave,
coef[10] = Coeff 0
coef[11] = Coeff 1
coef[12] = Coeff 2
coef[13] = Coeff 3

TracePro 2022 User’s Manual 7.67


Technical Reference

coef[14] = Coeff 4
coef[15] = Coeff 5 and so on.

DLL Export Definitions


Several programming languages may be used to compile the Scatter DLL. An
example using Microsoft Visual C++ is included on the CD in the Bulk Scatter
Property folder and on www.lambdares.com in the TracePro Technical Support
section, under Properties. Windows requires that the functions be Exported in
order that TracePro may access them. A typical Exports file (DEF) is shown
below.
LIBRARY bulk

EXPORTS
fnInitDll @2
fnMeanFreePath@3
fnEvaluateBSDF@4
fnScatterDirection@5

Non-Uniform Temperature Distributions


Overview
A temperature distribution property allows for non-uniform temperature
distributions over a surface. You can access it via the Temperature Distribution tab
in the Define|Apply Properties dialog. The surface shapes compatible with
this feature are planes and cylinders. For simple boundary shapes, the surface
boundary can be used as the boundary of the distribution. These simple shapes
are: rectangular (a plane with a rectangular boundary); circular (a plane with a
circular boundary); and cylindrical (the curved side of a cylinder, with planar ends
perpendicular to the cylinder’s axis). The distribution information is stored in an
ASCII file, and can be defined by: a two dimensional array of points along the
surface, with bilinear interpolation between the given points; or a polynomial
expression, up to the fifth order, with user-defined coefficients.
The temperature distribution, when used with a Surface Property or a Surface
Source Property that has several temperatures defined, enables the property to
vary with temperature spatially across the surface. During a ray-trace, the
temperature is first evaluated by interpolating the temperature distribution for the
ray intersection point, and then this temperature is used to interpolate Property.
This can also be used, indirectly, as a way to make TracePro use a spatially-
varying property. If the temperature is not important in the current analysis, it is
can be effectively used as a parameter to spatially vary the property.

Distribution Types
There are two surface types – planar and cylindrical – and two ways to define
temperature values along the surfaces – interpolating temperatures between
defined points, or using a set of equations to relate the temperature. In addition,
distributions on planar surfaces can be defined in either circular or rectangular

7.68 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

coordinates. This makes for six types of non-uniform temperature distributions,


listed in the table below.
TABLE 7.6. Types of temperature distributions

Type Description
0 Rectangular region, with interpolated points
1 Rectangular region, with polynomial distribution
2 Circular region, with interpolated points
3 Circular region, with polynomial distribution
4 Cylindrical region, with interpolated points
5 Cylindrical region, with polynomial distribution

Rectangular Coordinates
Rectangular distributions are defined by an X and Y coordinate system. It is
easiest to talk about a three-dimensional vector space in order to visualize the
arrangement of the axes. The Z axis is always normal to the surface. The origin,
local X axis, and dimensions of the distribution are entered in the bottom of the
dialog box, unless the surface has a rectangular boundary and you have selected
Use Surface Bounds. In that case the origin of the system is one of the vertices of
the rectangular surface. The X and Y axes are along the two edges of the
rectangle adjacent to the origin, selected by following the rules for a right-handed
coordinate system. This situation is illustrated below:

When Use Surface Bounds is selected, you can cycle the origin between the four
vertices using the Next Point button. The four possible axial systems are shown
below:

TracePro 2022 User’s Manual 7.69


Technical Reference

TracePro calculates all these vectors automatically once you define the origin.

Circular Coordinates
Circular distributions are defined by an R and  polar coordinate system. The
origin, local X axis, and radius of the distribution are entered in the bottom of the
dialog box, unless the surface boundary is circular and you have selected Use
surface bounds. In that case, the origin of the distribution is the center of the
circular surface, and the radius is the radius of the surface. You must set the X-
axis as the axis from which the angle  is measured, in a counter-clockwise
direction, as shown below:

Cylindrical Coordinates
Cylindrical distributions are defined by a Z and  coordinate system. The origin
and Z length of the distribution are entered in the bottom of the dialog box, unless
the surface has a simple boundary and you have selected Use surface bounds. In
that case, the center of the distribution is the center of the cylinder on which the
distribution is set. The Local Z axis is always set to be the axis of the cylinder.

7.70 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

You can reverse the direction of the Z axis by clicking the Flip Local Z button. The
 coordinate is best visualized when viewing a cross-section of the cylinder. Set
the X-axis as the axis from which  is measured, in the same way as for Circular
Coordinates. The two main differences between circular coordinates and
cylindrical, when viewed in this way, are that: for the slice of the cylinder, the origin
is the portion of the Z-axis cutting through the given cross-section; and that R is
always set as the radius of the cylinder because we need to be on the cylinder’s
surface.

TracePro 2022 User’s Manual 7.71


Technical Reference

Defining Temperature Distributions


For each of the surface types listed above, you can choose to set the temperature
distribution over the surface by giving TracePro a specified number of
temperature values. The three shapes all have slightly different formats for input
values. In general, you define the number of temperature values that will be given
in each dimension and then lists the values. Examples of such commands are
given below.
Additionally, you can choose to define temperatures over these surfaces by using
polynomials. In this case, select the coefficients of the polynomials to be used in
the approximation. The polynomial sets used for this are listed in the table below
(See the end of this chapter for further information concerning polynomial
distributions).
TABLE 7.7. Polynomial sets used for approximations of each dimension

Dimension (Surface Type) Polynomial Type


X (Rectangular) Legendre Polynomial
Y (Rectangular) Legendre Polynomial
R,  (Circular) Zernike Polynomial
Z (Cylindrical) Legendre polynomial
 (Cylindrical) Fourier Series

Both the options of interpolating between points and of using a polynomial


distribution to delineate temperatures are performed by using data stored in ASCII
files imported to TracePro through the Temperature Distribution tab under
Apply Properties.

7.72 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

FIGURE 7.22 - Temperature Distribution Dialog for Rectangular Interpolated


type with Use surface bounds selected.

In order to apply a property, select the desired surface, right-click and select
Properties, then Temperature Distribution. Load the file that was just created,
and use the Next Point or the Flip Local Z button, if necessary, to select an
alternate orientation. Click Apply and you are finished.

Format for Temperature Distribution Storage Files


Each of the six types of non-uniform temperature distributions has its own way of
storing data for TracePro. A general format for all of them is given in the following
two tables:

TracePro 2022 User’s Manual 7.73


Technical Reference

TABLE 7.8. General File Format for Import and Export


TracePro Temperature Distribution Property Data
File Name [file name]
TracePro Release: [release version]
Database Version: [database version]
Data generated at [time and date]

Name [Property Name]


Catalog [Property Catalog]
Description [Property Description]
Type <Type>
Dim1_Coeffs_Points < Dim1_Coeffs_Points>
Dim2_Coeffs_Points < Dim2_Coeffs_Points>
User_Data 1

<Header>
<Data Set>
NOTE: For data to replace information within < > see portion of Table 4 with
matching heading.
TABLE 7.9. Details for Creating Data Import and Export Files
Description of
Type Types Dim1_Coeffs_Points Dim2_Coeffs_Points Header Data Set
0 Rectangular, number of X points number of Y points Temperatures X*Y tempera-
Interpolated [Kelvin] ture values
Points
1 Rectangular, 6 6 Coefficients 6 Legendre
Polynomial coefficients
Distribution a0,0 a5,5
2 Circular, number of R points number of  points Temperatures R* tempera-
Interpolated [Kelvin] ture values
Points
3 Circular, 21 0 Coefficients 21 Zernike
Polynomial coefficients
Distribution
b0b20
4 Cylindrical, number of Z points number of  points Temperatures Z* temperature
Interpolated [Kelvin] values
Points
5 Cylindrical, 6 11 Coefficients 6 Legendre
Polynomial coefficients
Distribution c0,0 c5,10

When defining a non-uniform temperature distribution property, the file name,


property name, catalog, and description are at your discretion. These data
inquiries are the same for all six types. The remainder of the data fields within
temperature distribution import/export files are explained in detail below.

7.74 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

Type 0: Rectangular with Interpolated Points


For a type 0 distribution, the Dim1_Coeffs_Points is the number of columns of
points on the surface, while Dim2_Coeffs_Points is the number of rows. Under the
Data Set will be listed the temperature values. Let’s try defining a system that
looks as follows:
T(x1, ym) T(x2, ym) T(x3, ym) T(xn, ym)

.
.
.
.
. . . .
T(x1, y2) T(x2, y2) T(x3, y2) T(xn, y2)
y axis

T(x1, y1) T(x2, y1) T(x3, y1) T(xn, y1)

x axis
In this situation we have n columns and m rows. Entering our information into a
data file would give the following:
TracePro Temperature Distribution Property Data
File Name C:\Tracepro\Example0.txt
TracePro Release: 2 4 0
Database Version: 2 1 0
Data generated at 09:52:39 November 16, 2001

Name Type 0 Example


Catalog Examples
Description
Type 0
Dim1_Coeffs_Points n
Dim2_Coeffs_Points m
User_Data 1

Temperatures [Kelvin]
T(X1,Y1)
T(X2,Y1)
T(X3,Y1)
.
.
.

TracePro 2022 User’s Manual 7.75


Technical Reference

T(Xn,Y1)
T(X1,Y2)
T(X2,Y2)
T(X3,Y2)
.
.
.
T(Xn,Y2)
T(X1,Y3)
.
.
.
T(Xn,Ym-1)
T(X1,Ym)
T(X2,Ym)
T(X3,Ym)
.
.
.
T(Xn-2,Ym)
T(X n-1,Ym)
T(Xn,Ym)

Type 1: Rectangular with Polynomial Distribution


For a type 1 file Dim1_Coeffs_Points is the number of Legendre X coefficients, 6,
and Dim2_Coeffs_Points is the number of Legendre Y coefficients, 6. The Data
Set is now a list of coefficients for the user-defined polynomial. An example of
such a file is:
TracePro Temperature Distribution Property Data
File Name C:\Tracepro\Example1.txt
TracePro Release: 2 4 0
Database Version: 2 1 0
Data generated at 09:52:39 November 16, 2001

Name Type 1 Example


Catalog Examples
Description
Type 1
Dim1_Coeffs_Points 6
Dim2_Coeffs_Points 6
User_Data 1

Coefficients

7.76 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

a0,0
a1,0
a2,0
.
.
.
a5,0
a0,1
a1,1
a2,1
.
.
.
a5,1
a0,2
.
.
.
a5,4
a0,5
a1,5
.
.
.
a4,5
a5,5

Type 2: Circular with Interpolated Points


Type 2 situations have Dim1_Coeffs_Points as the number of different R values,
and Dim2_Coeffs_Points is the number of values to be gone through. In other
words, Dim1_Coeffs_Points is the number of concentric circles of points on the
surface, while Dim2_Coeffs_Points is the number of spokes out from the circle
with temperature values on them. Again, the temperature values are listed under
the Data Set. A general system would look like the following:

TracePro 2022 User’s Manual 7.77


Technical Reference

We have n concentric circles and m spokes. All points of the form T(R1,j), where
1  j  m , are defining the temperature at the origin. If the values given for points
of this form differ, TracePro will take the average and assign it to the origin. A
type 2 data file would have the following format:
TracePro Temperature Distribution Property Data
File Name C:\Tracepro\Example2.txt
TracePro Release: 2 4 0
Database Version: 2 1 0
Data generated at 09:52:39 November 16, 2001

Name Type 2 Example


Catalog Examples
Description
Type 2
Dim1_Coeffs_Points n
Dim2_Coeffs_Points m
User_Data 1

Temperatures [Kelvin]
T(R1,q1)
T(R2,q1)
T(R3,q1)
.
.
.
T(Rn,q1)
T(R1,q2)
T(R2,q2)
T(R3,q2)
.

7.78 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

.
.
T(Rn,q2)
T(R1,q3)
.
.
.
T(Rn,qm-1)
T(R1,qm)
T(R2,qm)
T(R3,qm)
.
.
.
T(Rn-2,qm)
T(R n-1,qm)
T(Rn,qm)

Type 3: Circular with Polynomial Distribution


A file for a type 3 situation will have the Dim1_Coeffs_Points as the number of
Zernike R,  coefficients, 21. Dim2_Coeffs_Points is not needed in this case, and
so is assigned the value of 0. The Data Set is a list of the Zernike coefficients. This
file type has the format:
TracePro Temperature Distribution Property Data
File Name C:\Tracepro\Example3.txt
TracePro Release: 2 4 0
Database Version: 2 1 0
Data generated at 09:52:39 November 16, 2001

Name Type 3 Example


Catalog Examples
Description
Type 3
Dim1_Coeffs_Points 21
Dim2_Coeffs_Points 0
User_Data 1

Coefficients
b0
b1
b2
b3
b4

TracePro 2022 User’s Manual 7.79


Technical Reference

b5
b6
b7
b8
b9
b10
b11
b12
b13
b14
b15
b16
b17
b18
b19
b20

Type 4: Cylinder with Interpolated Points


For a type 4 situation the Dim1_Coeffs_Points is the number of Z values along the
surface, and Dim2_Coeffs_Points is the number of values. Alternately,
Dim1_Coeffs_Points could be viewed as the number of cross-sections of values,
and Dim2_Coeffs_Points could be seen as the number of spokes of points at each
cross-section. The Data Set is a list of temperature values. A type 4 situation
would look as follows:

7.80 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

FIGURE 7.23 - Map view of cylinder’s surface

This diagram shows n cross-sections and m spokes. A data file for this
information would be:
TracePro Temperature Distribution Property Data
File Name C:\Tracepro\Example4.txt
TracePro Release: 2 4 0
Database Version: 2 1 0
Data generated at 09:52:39 November 16, 2001

Name Type 4 Example


Catalog Examples
Description
Type 4
Dim1_Coeffs_Points n
Dim2_Coeffs_Points m
User_Data 1

Temperatures [Kelvin]
T(Z1,q1)
T(Z2,q1)
T(Z3,q1)
.
.
.
T(Zn,q1)
T(Z1,q2)
T(Z2,q2)
T(Z3,q2)
.

TracePro 2022 User’s Manual 7.81


Technical Reference

.
.
T(Zn,q2)
T(Z1,q3)
.
.
.
T(Zn,qm-1)
T(Z1,qm)
T(Z2,qm)
T(Z3,qm)
.
.
.
T(Zn-2,qm)
T(Z n-1,qm)
T(Zn,qm)

Type 5: Cylinder with Polynomial Distribution


For a type 5 file Dim1_Coeffs_Points is the number of Legendre Z coefficients, 6,
and Dim2_Coeffs_Points is the number of Fourier Series  coefficients, 11. A list
of coefficients is now in the Data Set. This file type takes the form:
TracePro Temperature Distribution Property Data
File Name C:\Tracepro\Example5.txt
TracePro Release: 2 4 0
Database Version: 2 1 0
Data generated at 09:52:39 November 16, 2001

Name Type 5 Example


Catalog Examples
Description
Type 5
Dim1_Coeffs_Points 6
Dim2_Coeffs_Points 11
User_Data 1

Coefficients
c0,0
c1,0
c2,0
.
.
.

7.82 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

c5,0
c0,1
c1,1
c2,1
.
.
.
c5,1
c0,2
.
.
.
c5,9
c0,10
c1,10
.
.
.
c4,10
c5,10

Polynomial Approximations of Temperature Distributions


The following tables state the different polynomials available for approximating
temperature distributions. See Table 7.7 for a summary of the types of
distributions.
Polynomials use normalized coordinates. See the following sections for
explanations of how these coordinate systems are applied.

Legendre polynomials - rectangular plane


Legendre polynomials are defined in normalized coordinates, in which x and y
vary from -1 to 1, i.e. the range of values is -1<x<1 and -1<y<1. This means that
the reference point you define for a rectangular plane surface is located at x=-1,
y=-1, the opposite corner is x=1, y=1, and the center of the rectangle is at x=0,
y=0.

Zernike Polynomials - circular plane


Zernike polynomials are defined in normalized coordinates, in which 0<r<1, and
0<.
Therefore for a circular plane, r=0 at the center of the circle, r=1 at the edge of the
circle, =0 along the local x axis, and =/2 along the local y axis.

Legendre-Fourier polynomials - cylinder


The Zernike-Fourier functions are products of Legendre polynomials along the
length of the cylinder, with elements of a Fourier series. The Legendre

TracePro 2022 User’s Manual 7.83


Technical Reference

polynomials are in this case a function of the z axis of standard cylindrical


coordinates, with -1<z<1. The Fourier series terms are a function of theta, which
varies around the circumference of the cylinder, with 0<=0 along the local x
axis, and =/2 along the local y axis.

7.84 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

TABLE 7.10. Legendre Polynomials

Polynomial Number Polynomial


0 1
1 x
2 0.5 ( -1 + 3x2 )
3 0.5 ( -3x + 5x3 )
4 0.125 ( 3 – 30x2 + 35x4 )
5 0.125 ( 15x – 70x3 + 63x5 )

TABLE 7.11. Zernike Polynomials

Polynomial Number Polynomial


0 1
1 r cos
2 r sin
3 r2 cos2
4 2r2 – 1
5 r2 sin2
6 r3 cos3
7 ( 3r3 – 2r ) cos
8 ( 3r3 – 2r ) sin
9 r3 sin3
10 r4 cos4
11 ( 4r4 – 3r2 ) cos2
12 6r4 - 6r2 + 1
13 ( 4r4 – 3r2 ) sin2
14 r4 sin4
15 r5 cos5
16 ( 5r5 – 4r3 ) cos3
17 ( 10r5 – 12r3 + 3r ) cos
18 ( 10r5 – 12r3 + 3r ) sin
19 ( 5r5 – 4r3 ) sin3
20 r5 cos5

TABLE 7.12. Fourier Series

Term Number Term


0 0.5
1 cos
2 sin

TracePro 2022 User’s Manual 7.85


Technical Reference

3 cos2
4 sin2
5 cos3
6 sin3
7 cos4
8 sin4
9 cos5
10 sin5

Rules for combining the preceding sets of functions with the user-defined
coefficients are outlined in Table 7.13, and in greater detail in Table 7.14 through
Table 7.16. TracePro evaluates the user-created functions in three dimensions in
order to find the temperature value at any point on the surface.
TABLE 7.13. Polynomial functions for calculating temperatures

Distribution Type Function


1
T =   ai j Li  x Lj  y 
j=0 i=0
3
T =  b i Z i  r  
i=0
5
T =   ci j Li  z Fj   
j=0 i=0

7.86 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

TABLE 7.14. Polynomial for Rectangular Surfaces

Coefficient (ai,j) First Legendre Polynomial (Li(x)) Second Legendre Polynomial (Lj(y))
a0,0 1 1
a1,0 x 1
a2,0 [0.5 ( -1 + 3x2 )] 1
a3,0 [0.5 ( -3x + 5x3 )] 1
a4,0 [0.125 ( 3 – 30x2 + 35x4 )] 1
a5,0 [0.125 ( 15x – 70x3 + 63x5 )] 1
a0,1 1 y
a1,1 x y
a2,1 [0.5 ( -1 + 3x2 )] y
a3,1 [0.5 ( -3x + 5x3 )] y
a4,1 [0.125 ( 3 – 30x2 + 35x4 )] y
a5,1 [0.125 ( 15x – 70x3 + 63x5 )] y
a0,2 1 [0.5 ( -1 + 3y2 )]
a1,2 x [0.5 ( -1 + 3y2 )]
a2,2 [0.5 ( -1 + 3x2 )] [0.5 ( -1 + 3y2 )]
a3,2 [0.5 ( -3x + 5x3 )] [0.5 ( -1 + 3y2 )]
a4,2 [0.125 ( 3 – 30x2 + 35x4 )] [0.5 ( -1 + 3y2 )]
a5,2 [0.125 ( 15x – 70x3 + 63x5 )] [0.5 ( -1 + 3y2 )]
a0,3 1 [0.5 ( -3y + 5y3 )]
a1,3 x [0.5 ( -3y + 5y3 )]
a2,3 [0.5 ( -1 + 3x2 )] [0.5 ( -3y + 5y3 )]
a3,3 [0.5 ( -3x + 5x3 )] [0.5 ( -3y + 5y3 )]
a4,3 [0.125 ( 3 – 30x2 + 35x4 )] [0.5 ( -3y + 5y3 )]
a5,3 [0.125 ( 15x – 70x3 + 63x5 )] [0.5 ( -3y + 5y3 )]
a0,4 1 [ 0.125 ( 3 – 30y2 + 35y4 )]
a1,4 x [ 0.125 ( 3 – 30y2 + 35y4 )]
a2,4 [0.5 ( -1 + 3x2 )] [ 0.125 ( 3 – 30y2 + 35y4 )]
a3,4 [0.5 ( -3x + 5x3 )] [ 0.125 ( 3 – 30y2 + 35y4 )]
a4,4 [0.125 ( 3 – 30x2 + 35x4 )] [ 0.125 ( 3 – 30y2 + 35y4 )]
a5,4 [0.125 ( 15x – 70x3 + 63x5 )] [ 0.125 ( 3 – 30y2 + 35y4 )]
a0,5 1 [0.125 ( 15y – 70y3 + 63y5 )]
a1,5 x [0.125 ( 15y – 70y3 + 63y5 )]
a2,5 [0.5 ( -1 + 3x2 )] [0.125 ( 15y – 70y3 + 63y5 )]
a3,5 [0.5 ( -3x + 5x3 )] [0.125 ( 15y – 70y3 + 63y5 )]

TracePro 2022 User’s Manual 7.87


Technical Reference

a4,5 [0.125 ( 3 – 30x2 + 35x4 )] [0.125 ( 15y – 70y3 + 63y5 )]


a5,5 [0.125 ( 15x – 70x3 + 63x5 )] [0.125 ( 15y – 70y3 + 63y5 )]

TABLE 7.15. Polynomial for Circular Surfaces

Coefficient (bi) Zernike Polynomial (Zi(r,))


b0 1
b1 (r cos
b2 (r sin
b3 (r2 cos2)
b4 (2r2 – 1)
b5 (r2 sin2
b6 (r3 cos3
b7 [( 3r3 – 2r ) cos
b8 [( 3r3 – 2r ) sin]
b9 (r3 sin3)
b10 (r4 cos4)
b11 [( 4r4 – 3r2 ) cos2]
b12 (6r4 - 6r2 + 1)
b13 [( 4r4 – 3r2 ) sin2]
b14 (r4 sin4)
b15 (r5 cos5)
b16 [( 5r5 – 4r3 ) cos3]
b17 [( 10r5 – 12r3 + 3r ) cos]
b18 [( 10r5 – 12r3 + 3r ) sin]
b19 [( 5r5 – 4r3 ) sin3]
b20 (r5 cos5)

TABLE 7.16. Polynomial for Cylindrical Surfaces

Coefficient (ci,j) Legendre Polynomial (Li(z)) Fourier Series (Fj())


c0,0 1 0.5
c1,0 z 0.5
c2,0 [0.5 ( -1 + 3z2 )] 0.5
c3,0 [0.5 ( -3z + 5z3 )] 0.5
c4,0 [0.125 ( 3 – 30z2 + 35z4 )] 0.5
c5,0 [0.125 ( 15z – 70z3 + 63z5 )] 0.5
c0,1 1 cos

7.88 TracePro 2022 User’s Manual


Non-Uniform Temperature Distributions

c1,1 z cos
c2,1 [0.5 ( -1 + 3z2 )] cos
c3,1 [0.5 ( -3z + 5z3 )] cos
c4,1 [0.125 ( 3 – 30z2 + 35z4 )] cos
c5,1 [0.125 ( 15z – 70z3 + 63z5 )] cos
c0,2 1 sin
c1,2 z sin
c2,2 [0.5 ( -1 + 3z2 )] sin
c3,2 [0.5 ( -3z + 5z3 )] sin
c4,2 [0.125 ( 3 – 30z2 + 35z4 )] sin
c5,2 [0.125 ( 15z – 70z3 + 63z5 )] sin
c0,3 1 cos2
c1,3 z cos2
c2,3 [0.5 ( -1 + 3z2 )] cos2
c3,3 [0.5 ( -3z + 5z3 )] cos2
c4,3 [0.125 ( 3 – 30z2 + 35z4 )] cos2
c5,3 [0.125 ( 15z – 70z3 + 63z5 )] cos2
c0,4 1 sin2
c1,4 z sin2
c2,4 [0.5 ( -1 + 3z2 )] sin2
c3,4 [0.5 ( -3z + 5z3 )] sin2
c4,4 [0.125 ( 3 – 30z2 + 35z4 )] sin2
c5,4 [0.125 ( 15z – 70z3 + 63z5 )] sin2
c0,5 1 cos3
c1,5 z cos3
c2,5 [0.5 ( -1 + 3z2 )] cos3
c3,5 [0.5 ( -3z + 5z3 )] cos3
c4,5 [0.125 ( 3 – 30z2 + 35z4 )] cos3
c5,5 [0.125 ( 15z – 70z3 + 63z5 )] cos3
c0,6 1 sin3
c1,6 z sin3
c2,6 [0.5 ( -1 + 3z2 )] sin3
c3,6 [0.5 ( -3z + 5z3 )] sin3
c4,6 [0.125 ( 3 – 30z2 + 35z4 )] sin3
c5,6 [0.125 ( 15z – 70z3 + 63z5 )] sin3
c0,7 1 cos4

TracePro 2022 User’s Manual 7.89


Technical Reference

c1,7 z cos4
c2,7 [0.5 ( -1 + 3z2 )] cos4
c3,7 [0.5 ( -3z + 5z3 )] cos4
c4,7 [0.125 ( 3 – 30z2 + 35z4 )] cos4
c5,7 [0.125 ( 15z – 70z3 + 63z5 )] cos4
c0,8 1 sin4
c1,8 z sin4
c2,8 [0.5 ( -1 + 3z2 )] sin4
c3,8 [0.5 ( -3z + 5z3 )] sin4
c4,8 [0.125 ( 3 – 30z2 + 35z4 )] sin4
c5,8 [0.125 ( 15z – 70z3 + 63z5 )] sin4
c0,9 1 cos5
c1,9 z cos5
c2,9 [0.5 ( -1 + 3z2 )] cos5
c3,9 [0.5 ( -3z + 5z3 )] cos5
c4,9 [0.125 ( 3 – 30z2 + 35z4 )] cos5
c5,9 [0.125 ( 15z – 70z3 + 63z5 )] cos5
c0,10 1 sin5
c1,10 z sin5
c2,10 [0.5 ( -1 + 3z2 )] sin5
c3,10 [0.5 ( -3z + 5z3 )] sin5
c4,10 [0.125 ( 3 – 30z2 + 35z4 )] sin5
c5,10 [0.125 ( 15z – 70z3 + 63z5 )] sin5

Interpretation of Polar Iso-Candela Plots


Iso-candela intensity plots (i.e., W/sr or cd depending on the units) can cause
confusion to users. This section addresses such potential confusion by providing
an example that illustrates what happens when you project a hemispherical
distribution onto a plane. Figure 7.24 shows the sphere over which the intensity
distribution should be viewed, and then how it is projected to the base plane of
this hemisphere. For this simple illustration the projected solid angle is given by

d = d cos  (7.45)
where is the angle with respect to the normal axis, is the solid angle, and is the
projected solid angle. In TracePro the angle is the one with respect to the
Normal (as defined in Analysis|Candela Plot Options). Each of the rays
is binned within constant solid angle bins (i.e., they span the same surface are on
the unit hemisphere). Additionally, for Polar Iso-Candela plots, individually each

7.90 TracePro 2022 User’s Manual


Interpretation of Polar Iso-Candela Plots

ray is corrected for the nonlinear projection from this hemisphere to the plane.
This nonlinear projection is due to the constant angular spacing in the radial
direction on polar iso-candela plots, as shown in Figure 7.25 and Figure 7.26 (i.e.,
the annular pie slices do not have constant areas as function of the radiant angle).
Thus, two rays at different angles that are in the same bin with the same flux will
contribute different amounts of intensity (cd or W/sr) to this bin. If you save the
Polar Iso-candela data (File|Save As… of type *.txt), the nonlinear projection is
also saved.

d



d

FIGURE 7.24 - Depiction of solid angle projection from a hemisphere to the


base plane of the hemisphere.

To illustrate this, consider the case shown in Figure 7.25, there are grid sources
comprised each of single rays. Grid 1 has a ray in the x-z plane at an angle of
63.426º to the z axis. Grid 2 has a ray in the x-z plane at an angle of 64.537º to
the z axis. Figure 7.26 shows the iso-candela plots (Analysis|Candela
Plots|Polar Iso-Candela) for (a) Grid 1 and (b) Grid 2. Note the difference
in the maximum candela values, which arises due to the nonlinear projection.
Polar iso-candela plots in direction cosine values do not suffer from this projection
effect since the cos(q) value in See Equation 7.45 on page 7.90 is simply the axial
plot dimension. However such plots are currently not available in TracePro.
Finally, one can rotate the plot normal, by, for example, placing the Grid 1 ray at
the pole. This is done by changing Analysis|Candela Plot Options >
Orientation and Rays tab X to 0.8944 and Z to 0.4472. Figure 36 shows the
results for (a) Grid 1 and (b) Grid 2.

TracePro 2022 User’s Manual 7.91


Technical Reference

FIGURE 7.25 - Polar Iso-Candela Plots for Grids (a) 1 and (b) 2, Normal = (0,
0, 1).

FIGURE 7.26 - Polar Iso-Candela Plots for Grids (a) 1 and (b) 2, Normal =
(0.8944, 0, 0.4472).

7.92 TracePro 2022 User’s Manual


Property Import/Export Formats

Property Import/Export Formats


Material Property Format
The format includes 18 header lines, which must be present in the file followed by
the actual property data. Tabs or spaces may be used to separate data (tabs are
more convenient when working with spreadsheets) and properties exported from
TracePro will use tabs.
The tables below describe the format of these files, but the easiest way to learn
how to use the Import/Export format is to export a material property and view it
yourself in text format. You may wish to treat the following information as a
reference, rather than a tutorial.

Read for
Line # Description Import Format
1 File Header Yes TracePro Material Property Data
2 Database File Ignored File Name E:\TraceProData\tracepro.mdb
Name
3 TracePro Ver- Ignored TracePro Version: 2 1 0
sion
4 Database Yes Database Version: 2 1 0
Version
5 Data file was Ignored Data generated at 09:32:31 May 06, 2000
generated
6 Blank line Ignored
7 Property Yes Name name
Name
8 Property Cat- Yes Catalog name
alog (If the catalog does not exist, it will be created
during the import)
9 Property Yes Description text
Description
10 Military Speci- Yes MILSPEC text
fication
11 Start of Wave- Yes WaveStart number Wavelength in microns
length Range
12 End of Wave- Yes WaveStart number Wavelength in microns
length Range

TracePro 2022 User’s Manual 7.93


Technical Reference

13 Equation Yes code


Type 1. Interpolation from table
2. Schott polynomial
3. Sellmeier (1) polynomial
4. Extended Schott polynomial
5. Herzberger polynomial
6. Conrady polynomial
7. Sellmeier (2) polynomial
8. Sellmeier (3) polynomial
9. Sellmeier (4) polynomial
10. Handbook of Optics (1) 
polynomial
11. Handbook of Optics (2)
polynomial
14 User Data Yes User flag
flag flag
1. Lambda Research Data
(Read Only)
2. User added data 
(Read/Write)
15 Coefficients Yes This set the units of the absorption col-
umn to alpha, for internal transmittance,
or k for imaginary refractive index.
Bulk_is_Alpha sets units to alpha
Bulk_is_K sets units to k
16-17 Polynomial Yes Two rows of five numbers. Zero if table inter-
Coefficients polation is used.
18 Column Yes Temperature Wavelength Index Absorption
Headers
19+ Wavelength Yes Multiple rows of data:
Data Temperature Wavelength Index Absorption
Last Save Data Optional SAVE-DATA
This may be placed between multiple proper-
ties and is used by the Tools|Data-
base|Import command

Surface Property Format


The format includes 15 header lines, which must be present in the file followed by
the property data. Tabs or spaces may be used to separate data (tabs are more
convenient when working with spreadsheets) and properties exported from
TracePro will use tabs. The tables below describe the format of these files, but the
easiest way to learn how to use the Import/Export format is to export a surface
property that is already defined and view it yourself in text format. This will allow
you to see exactly what data TracePro exports with each property. Practice by
modifying the property name and using the Tools|Database|Import command
to add it to your database under the new name.

7.94 TracePro 2022 User’s Manual


Property Import/Export Formats

Line Read for


# Description Import Format
1 File Header Yes TracePro Surface Property Data
2 Database File Ignored File Name E:\TraceProData\trace-
Name pro.db
3 TracePro Ver- Ignored TracePro Version n n n
sion
4 Database Ver- Yes Database Version n n n
sion
5 Data file was Ignored Data generated at hh:mm:ss Month
generated dd, yyyy
6 Blank line Ignored
7 Property Yes Name name
Name
8 Property Yes Description text
Description
9 Coating Data Yes Coating flag
Flag flag values:
1. no coating data, Fresnel
(specular terms are 0.0)
2. tabular data
3. stack with Stack Name
Coating 2 MgF Layer
4. grating type with grating spacing
Coating 3 12
5. Coating DLL type
6. (not used)
7. Direction-sensitive property
10 Scatter type Yes Scatter type
0 No scatter
1 ABg
2 Elliptical ABg
3 Elliptical Gaussian
4 Table
5 Asymmetric Table
11 Interaction Yes Interaction flag
flag flag values:
1. normal surface interaction
2. retroreflector
12 Polarization Yes Polarization flag
flag flag
1. non-polarizing property
(S and P terms are equal)
2. polarizing data

TracePro 2022 User’s Manual 7.95


Technical Reference

13 User Data flag Yes User flag


flag values:
1. Lambda Research Data
(Read Only)
2. User data 
(Read/Write)
14 Solve Code Yes Solve code
code values:
<None>
no solve performed
ABSORP
solve for absorptance
SPECREFL
solve for reflectance
SPECTRANS
solve for transmittance
BRDF
solve for BRDF
BTDF
solve for BTDF
15 Blank Line Ignored
16 Side 1 Data Yes Side1_Data
(optional) If present, the data that follows is for
Side 1 of a Direction-sensitive prop-
erty
16 Column Only Tem- Temperature (followed by additional
or Headers perature is column headers)
17 Ignored
17+ Surface Data Yes 17 columns of real numbers
or
18+
17+ Grating Data Yes AnisotropicGratingData
or Line If this line exists the following data will
18+ be applied to the grating orders.
17+ Grating Data Yes eight columns of real numbers
or
18+
17+ Table BSDF Yes Table_BSDF_Data
or Data Line If this line exists the following data will
18+ be applied to the BRDF and BTDF
values
17+ Table BSDF Yes eight columns of real numbers
or Data
18+

7.96 TracePro 2022 User’s Manual


Property Import/Export Formats

19+ Side 2 Data Yes Side2_Data


or (optional) If present, the data that follows is for
20+ Side 2 of a Direction-sensitive prop-
erty
Last Save Data Optional SAVE-DATA
This may be placed between multiple
properties and is used by the
Tools|Database|Import command

Surface Property Data Columns


The Surface Property Data is placed in 17 columns separated by spaces or tabs.
The example shown is for Elliptical ABg Model BSDF data.

Column # Name Description


1 Temperature Kelvin
2 Wavelength Microns
3 Inc Angle Angle of incidence
4 Azi Angle Azimuthal Angle
5 Abso_S Specular Absorptance for S polarization
6 Abso_P Specular Absorptance for P polarization
7 Refl_S Specular Reflectance for S polarization
8 Refl_P Specular Reflectance for P polarization
9 Tran_S Specular Transmittance for S polarization
10 Tran_P Specular Transmittance for S polarization
11 PhaseRefl Phase change for Transmittance
12 PhaseTran Phase change for Transmittance
13 BRDF_A A coefficient of BRDF
14 BRDF_B B coefficient of BRDF
15 BRDF_By B coefficient of BRDF
16 BRDF_g g coefficient of BRDF
17 BRDF_gy g coefficient of BRDF
18 BTDF_A A coefficient of BTDF
19 BTDF_B B coefficient of BTDF
20 BTDF_By B coefficient of BTDF
21 BTDF_g g coefficient of BTDF
22 BTDF_gy g coefficient of BTDF

Grating Data Columns


The Grating Data follows in a separate table beginning with the header
AnisotropicGratingData. Grating Data is organized in eight columns separated by
tabs.

TracePro 2022 User’s Manual 7.97


Technical Reference

Column # Name Description


1 Temperature Kelvin
2 Wavelength Microns
3 Angle Angle of incidence (degrees)
4 Order Grating Order
5 Eff_Refl_S Efficiency for Reflectance in the S polarization
6 Eff_Refl_P Efficiency for Reflectance in the P polarization
7 Eff_Tran_S Efficiency for Transmittance in the S polarization
8 Eff_Tran_P Efficiency for Transmittance in the P polarization

Table BSDF Data Columns


Table BDSF Data follows in a separate table with header Table_BSDF_Data.
Table BSDF is organized in eight columns separated by tabs.

Column # Name Description


1 Temperature Kelvin
2 Wavelength Microns
3 IncAngle Polar angle of incidence (degrees)
4 AziAngle Azimuthal angle of incidence (degrees)
5 ScatterBeta The length of the β-β0 vector (unitless)
6 ScatterAzimuth The azimuthal angle of the β-β0 vector (degrees)
7 BRDF The value of the BRDF at the parameters (1/sr)
8 BTDF The value of the BTDF at the parameters (1/sr)

Stack Property Format


The format includes 12 header lines, which must be present in the file followed by
the property data. Tabs or spaces may be used to separate data (tabs are more
convenient when working with spreadsheets) and properties exported from
TracePro will use tabs. The tables below describe the format of these files, but the
easiest way to learn how to use the Import/Export format is to export a stack
property that is already defined and view it yourself in text format. This will allow
you to see exactly what data TracePro exports with each property. Practice by
modifying the property name and using the Tools|Database|Import command
to add it to your database under the new name.

Read for
Line # Description Import Format
1 File Header Yes TracePro Stack Property Data

7.98 TracePro 2022 User’s Manual


Property Import/Export Formats

2 Database File Ignored File Name E:\TraceProData\trace-


Name pro.mdb
3 TracePro Ver- Ignored TracePro Version: 2 1 0
sion
4 Database Ver- Yes Database Version: 2 1 0
sion
5 Data file was Ignored Data generated at 09:32:31 May 06,
generated 2000
6 Blank line Ignored
7 Property Name Yes Name name
8 Property Yes Description text
Description
9 Type Flag Ignored
10 User Data flag Yes User flag
flag
1. Lambda Research Data
(Read Only)
2. User added data 
(Read/Write)
11 Blank Line Ignored
12 Column Head- Ignored Thickness(um) CatalogName
ers
13+ Data Yes Column
1. Thickness (um)
2. Material Catalog
3. Material Name
Last Save Data Optional SAVE-DATA
This may be placed between multiple
properties and is used by the
Tools|Database|Import command

Gradient Index Property Format


The format includes 12 header lines, which must be present in the file followed by
the property data. Tabs or spaces may be used to separate data (tabs are more
convenient when working with spreadsheets) and properties exported from
TracePro will use tabs. The tables below describe the format of these files, but the
easiest way to learn how to use the Import/Export format is to export a gradient
index property that is already defined and view it yourself in text format. This will
allow you to see exactly what data TracePro exports with each property. Practice
by modifying the property name and using the Tools|Database|Import
command to add it to your database under the new name.

Line Read for


# Description Import Format
1 File Header Yes TracePro Gradient Index Property
Data

TracePro 2022 User’s Manual 7.99


Technical Reference

2 Database File Ignored File Name E:\TraceProData\trace-


Name pro.mdb
3 TracePro Ver- Ignored TracePro Version: 2 1 0
sion
4 Database Ver- Yes Database Version: 2 1 0
sion
5 Data file was Ignored Data generated at 09:32:31 May 06,
generated 2000
6 Blank line Ignored
7 Property Yes Name name
Name
8 Property Yes Description text
Description
9 Type Flag Yes Type flag
Flag values
1. Axial-Radial gradient
2. Axial-Elliptical gradient
3. Axial-Sinusoidal-Radial gradient
4. Axial-Tapered-Radial gradient
5. SELFOC gradient
6. Wood Lens gradient
7. Spherical gradient
8. Fisheye Lens gradient
9. Luneburg Lens gradient
10. GRADIUM (Buchdahl) gradient
11. GRADIUM (Sellmeier) gradient
10 User Data flag Yes User flag
flag
1. Lambda Research Data
(Read Only)
2. User added data 
(Read/Write)
11 Blank Line Ignored
12 Column Only Tem- Temperature (followed by additional
Headers perature is column headers)
Ignored

7.100 TracePro 2022 User’s Manual


Property Import/Export Formats

13+ Data Yes 18 columns of real numbers for prop-


erties not of type GRADIUM
OR…
32 columns of real numbers for prop-
erties of type GRADIUM (Buchdahl)
OR…
64 columns of real numbers for prop-
erties of type GRADIUM (Sellmeier)
Last Save Data Optional SAVE-DATA
This may be placed between multiple
properties and is used by the
Tools|Database|Import command

Gradient Index Data Columns (non-GRADIUM types)


The Gradient Index data for non-GRADIUM types is placed in 18 columns
separated by spaces or tabs.

Column # Name Description Used By


1 Temperature Degrees C (not currently used)
2 Wavelength Microns Axial-Radial gradient 
Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient
SELFOC gradient
Wood Lens gradient
Spherical gradient
Fisheye Lens gradient
Luneburg Lens gradient
3 nz1 Axial  Axial-Radial gradient 
coefficient Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient
4 nz2 Axial  Axial-Radial gradient 
coefficient Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient
5 nz3 Axial  Axial-Radial gradient 
coefficient Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient
6 nz4 Axial  Axial-Radial gradient 
coefficient Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient

TracePro 2022 User’s Manual 7.101


Technical Reference

7 nr1 Radial  Axial-Radial gradient 


coefficient Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient
SELFOC gradient
Wood Lens gradient
Spherical gradient
Fisheye Lens gradient
Luneburg Lens gradient
8 nr2 Radial  Axial-Radial gradient 
coefficient Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient
SELFOC gradient
Spherical gradient
9 nr3 Radial  Axial-Radial gradient 
coefficient Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient
SELFOC gradient
Spherical gradient
10 nr4 Radial  Axial-Radial gradient 
coefficient Axial-Elliptical gradient
Axial-Sinusoidal-Radial gradient
Axial-Tapered-Radial gradient
SELFOC gradient
Spherical gradient
11 nrx Elliptical radial Axial-Elliptical gradient
coefficient
12 nry Elliptical radial Axial-Elliptical gradient
coefficient
13 sva Sinusoidal Axial-Sinusoidal-Radial gradient
radial 
coefficient
14 svp Sinusoidal Axial-Sinusoidal-Radial gradient
radial 
coefficient
15 svf Sinusoidal Axial-Sinusoidal-Radial gradient
radial 
coefficient
16 tas Tapered radial Axial-Tapered-Radial gradient
coefficient
17 tao Tapered radial Axial-Tapered-Radial gradient
coefficient
18 sgc Spherical  Spherical gradient 
coefficient Fisheye Lens gradient
Luneburg Lens gradient

Gradient Index Data Columns (GRADIUM (Buchdahl) type)


The Gradient Index data for the GRADIUM (Buchdahl) type is placed in 32
columns separated by spaces or tabs

7.102 TracePro 2022 User’s Manual


Property Import/Export Formats

Column # Name Description Used By


1 Temperature Degrees C (not currently used)
2 gwv Reference wave- GRADIUM (Buchdahl) gradient
length in microns
3 gmz Blank thickness GRADIUM (Buchdahl) gradient
4 goz Offset into blank GRADIUM (Buchdahl) gradient
5 gnz0 0th order profile GRADIUM (Buchdahl) gradient
coefficient
6 gnz1 1st order profile GRADIUM (Buchdahl) gradient
coefficient
7 gnz2 2nd order profile GRADIUM (Buchdahl) gradient
coefficient
8 gnz3 3rd order profile GRADIUM (Buchdahl) gradient
coefficient
9 gnz4 4th order profile GRADIUM (Buchdahl) gradient
coefficient
10 gnz5 5th order profile GRADIUM (Buchdahl) gradient
coefficient
11 gnz6 6th order profile GRADIUM (Buchdahl) gradient
coefficient
12 gnz7 7th order profile GRADIUM (Buchdahl) gradient
coefficient
13 gnz8 8th order profile GRADIUM (Buchdahl) gradient
coefficient
14 gnz9 9th order profile GRADIUM (Buchdahl) gradient
coefficient
15 gnz10 10th order pro- GRADIUM (Buchdahl) gradient
file coefficient
16 gnz11 11th order profile GRADIUM (Buchdahl) gradient
coefficient
17 gra1 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
18 grb1 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
19 grc1 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
20 grd1 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
21 gra2 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
22 grb2 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
23 grc2 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
24 grd2 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient

TracePro 2022 User’s Manual 7.103


Technical Reference

25 gra3 Buchdahl chro- GRADIUM (Buchdahl) gradient


matic coefficient
26 grb3 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
27 grc3 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
28 grd3 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
29 gra4 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
30 grb4 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
31 grc4 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient
32 grd4 Buchdahl chro- GRADIUM (Buchdahl) gradient
matic coefficient

Gradient Index Data Columns (GRADIUM (Sellmeier) type)


The Gradient Index data for the GRADIUM (Sellmeier) type is placed in 64
columns separated by spaces or tabs

Column # Name Description Used By


1 Temperature Degrees C (not currently used)
2 gwv Reference wave- GRADIUM (Sellmeier)
length in microns gradient
3 gmz Blank thickness GRADIUM (Sellmeier)
gradient
4 goz Offset into blank GRADIUM (Sellmeier)
gradient
5 gnz0 0th order profile GRADIUM (Sellmeier)
coefficient gradient
6 gnz1 1st order profile GRADIUM (Sellmeier)
coefficient gradient
7 gnz2 2nd order profile GRADIUM (Sellmeier)
coefficient gradient
8 gnz3 3rd order profile GRADIUM (Sellmeier)
coefficient gradient
9 gnz4 4th order profile GRADIUM (Sellmeier)
coefficient gradient
10 gnz5 5th order profile GRADIUM (Sellmeier)
coefficient gradient
11 gnz6 6th order profile GRADIUM (Sellmeier)
coefficient gradient
12 gnz7 7th order profile GRADIUM (Sellmeier)
coefficient gradient
13 gnz8 8th order profile GRADIUM (Sellmeier)
coefficient gradient

7.104 TracePro 2022 User’s Manual


Property Import/Export Formats

14 gnz9 9th order profile GRADIUM (Sellmeier)


coefficient gradient
15 gnz10 10th order pro- GRADIUM (Sellmeier)
file coefficient gradient
16 gnz11 11th order profile GRADIUM (Sellmeier)
coefficient gradient
17-24 K'_11, K'_12, K'1x GRADIUM (Sellmeier)
… , K'_18 Sellmeier chro- gradient
matic coefficients
25-32 K'_21, K'_22, K'2x GRADIUM (Sellmeier)
… , K'_28 Sellmeier chro- gradient
matic coefficients
33-40 K'_31, K'_32, K'3x GRADIUM (Sellmeier)
… , K'_38 Sellmeier chro- gradient
matic coefficients
41-48 L_11, L_12, L1x GRADIUM (Sellmeier)
… , L_18 Sellmeier chro- gradient
matic coefficients
49-56 L_21, L_22, L2x GRADIUM (Sellmeier)
… , L_28 Sellmeier chro- gradient
matic coefficients
57-64 L_31, L_32, L3x GRADIUM (Sellmeier)
… , L_38 Sellmeier chro- gradient
matic coefficients

Bulk Scatter Property Format


The format includes 12 header lines, which must be present in the file followed by
the actual property data. Tabs or spaces may be used to separate data (tabs are
more convenient when working with spreadsheets) and properties exported from
TracePro will use tabs.
The tables below describe the format of these files, but the easiest way to learn
how to use the Import/Export format is to export a bulk scatter property and view it
yourself in text format. You may wish to treat the following information as a
reference, rather than a tutorial.

Read for
Line # Description Import Format
1 File Header Yes TracePro Bulk Scattering Property Data
2 Database File Ignored File Name E:\TraceProData\tracepro.mdb
Name
3 TracePro Ver- Ignored TracePro Version: 2 1 0
sion
4 Database Yes Database Version: 2 1 0
Version
5 Data file was Ignored Data generated at 09:32:31 May 06, 2000
generated

TracePro 2022 User’s Manual 7.105


Technical Reference

6 Blank line Ignored


7 Property Yes Name text
Name
8 Property Yes Description text
Description
9 User Data Yes User flag
flag flag
1. Lambda Research Data
(Read Only)
2. User added data 
(Read/Write)
10 Type Ignored
11 Blank line Ignored
12 Column Ignored Temperature Wavelength
Headers Coef 0 Coef 1 Coef 2
Coef 3 Coef 4 Coef 5
13+ Scatter data Yes Temperature Wavelength and 5 coefficients
Coefficient
1. Anisotropy (g)
2. Scattering (1/mm)
3. Alpha (Gegenbauer Model)
4. unused ( in V2.1 )
5. unused ( in V2.1 )
Last Save Data Optional SAVE-DATA
This may be placed between multiple proper-
ties and is used by the Tools|Data-
base|Import command

Fluorescence Property Format


The format includes 16 header lines, which must be present in the file followed by
the property data. Tabs or spaces may be used to separate data (tabs are more
convenient when working with spreadsheets) and properties exported from
TracePro will use tabs. The tables below describe the format of these files, but the
easiest way to learn how to use the Import/Export format is to export a property
that is already defined and view it yourself in text format. This will allow you to see
exactly what data TracePro exports with each property. Practice by modifying the
property name and using the Tools|Database|Import command to add it to
your database under the new name.

Read for
Line # Description Import Format
1 File Header Yes TracePro Bulk Fluorescence Property Data
2 Database File Ignored File Name E:\TraceProData\tracepro.mdb
Name
3 TracePro Ver- Ignored TracePro Version: 4 0 0
sion

7.106 TracePro 2022 User’s Manual


Property Import/Export Formats

4 Database Yes Database Version: 3 3 0


Version
5 Date file was Ignored Data generated at 09:32:31 May 06, 2006
generated
6 Blank line Ignored
7 Property Yes Name name
Name
8 Property Yes Description text
Description
9 Type Flag Ignored
10 User Data Yes User flag
Flag flag
1. Lambda Research Data
(Read Only)
2. User added data 
(Read/Write)
11 Blank Line Ignored
12 Peak_Extinc- Yes Peak Extinction value.
tion

13 Conver- Yes Conversion Efficiency value


sion_Effi-
ciency
14 Blank Line Ignored
15 Column Ignored Temperature ExcitationWavelength 
Headers RelativeAbsorption RelativeExcitation
16 Column Ignored Temperature EmissionWavelength 
Headers RelativeEmission
17+ Data Yes Column (First Excitation Data)
1. Temperature
2. Excitation Wavelength
3. Relative Absorption
4. Relative Excitation
Column (Second Emission Data)
1. Temperature
2. Emission Wavelength
3. Relative Emission
Last Save Data Optional SAVE-DATA
This may be placed between multiple proper-
ties and is used by the Tools|Data-
base|Import command

Surface Source Property Format


The format includes 21 header lines, which must be present in the file, followed by
the property data. Tabs or spaces may be used to separate data (tabs are more

TracePro 2022 User’s Manual 7.107


Technical Reference

convenient when working with spreadsheets) and properties exported from


TracePro will use tabs. The tables below describe the format of these files, but the
easiest way to learn how to use the Import/Export format is to export a property
that is already defined and view it yourself in text format. This will allow you to see
exactly what data TracePro exports with each property. Practice by modifying the
property name and using the Tools|Database|Import command to add it to
your database under the new name.

Read for
Line # Description Import Format
1 File Header Yes TracePro Bulk Fluorescence Property Data
2 Database File Ignored File Name E:\TraceProData\tracepro.mdb
Name
3 TracePro Ver- Ignored TracePro Version: 5 0 0
sion
4 Database Yes Database Version: 3 3 0
Version
5 Date file was Ignored Data generated at 09:32:31 May 06, 2006
generated
6 Blank line Ignored
7 Property Yes Name name
Name
8 Property Cat- Yes Catalog catalog
alog
9 Property Yes Description text
Description
10 User Data Yes User flag
Flag flag
1. Lambda Research Data
(Read Only)
2. User added data 
(Read/Write)
11 Spectral Type Yes 0 = Rectangular
1 = Gaussian
2 = Solar
3 = Table
12 Angular Type Yes 0 = Lambertian
1 = Uniform
2 = Gaussian
3 = Solar
4 = Table
13 Units Yes 0 = Radiometric
1 = Photometric
14 Quantity Yes 0 = Irradiance/Illuminance
1 = Flux
15 Emission Yes Total emission of the source

7.108 TracePro 2022 User’s Manual


Property Import/Export Formats

16 Wavelength1 Yes Min wavelength (Rectangular)


Center wavelength (Gaussian)
17 Wavelength2 Yes Max wavelength (Rectangular)
1/e2 half-width (Gaussian)
18 Angle1 Yes Conical angle (Lambertian and Uniform)
x-direction 1/e2 half-width (Gaussian)
19 Angle2 Yes y-direction 1/e2 half-width (Gaussian)
20 Blank Ignored
21 Column Yes Temperature Wavelength Polar Angle Azi-
Headers muth Angle Emissivity
12+ Data Yes Column
1. Temperature
2. Wavelength
3. Polar Angle
4. Azimuth Angle
5. Emissivity
Last Save Data Optional SAVE-DATA
This may be placed between multiple proper-
ties and is used by the Tools|Data-
base|Import command

RepTile Property Format


The format includes 12 header lines, which must be present in the file followed by
the property data. Tabs or spaces may be used to separate data (tabs are more
convenient when working with spreadsheets) and properties exported from
TracePro will use tabs. The tables below describe the format of these files, but the
easiest way to learn how to use the Import/Export format is to export a gradient
index property that is already defined and view it yourself in text format. This will
allow you to see exactly what data TracePro exports with each property. Practice
by modifying the property name and using the Tools|Database|Import
command to add it to your database under the new name.

Line Read for


# Description Import Format
1 File Header Yes TracePro RepTile Property Data
2 Database File Ignored File Name C:\Documents and Settings\user-
Name name\Application Data\Lambda Research Corpo-
ration\TracePro\tracepro.db
3 TracePro Ver- Ignored TracePro Version: 4 1 1
sion
4 Database Ver- Yes Database Version: 3 3 0
sion

TracePro 2022 User’s Manual 7.109


Technical Reference

5 Data file was Ignored Data generated at 17:28:43 June 29, 2007
generated
6 Blank line Ignored
7 Property Yes Name name
Name
8 Property Yes Description text
Description
9 Geometry Yes Geometry_Type type
Type 0. None
1. Fresnel
2. Cone
3. Sphere
4. Hip Roof
5. Cube
6. Prism
7. Rounded Prism
8. Ellipsoid
9. Log
10. Enhanced Prism
11. Flattened Cone
12. Pointed Cone
14. Block
15. Chiseled Log
16. Torus
17. Asphere
18. Polygon
19. Pyramid
20. Circular Hip Roof
10 Tile Type Yes Tile_Type type
0. None
1. Rings
2. Rectangle
3. Stagger
4. Hexagonal
11 Vary Row type Yes Vary_Rows type
0. Constant
1. Vary by Row or Ring
2. Parameterized
3. Texture File
12 Bump type Yes Bump_Type type
0. Bump
1. Hole
2. Mixed (Texture)
3. Inverted (Texture)

7.110 TracePro 2022 User’s Manual


Property Import/Export Formats

13 X Width Yes Width_X value


14 Y Width Yes Width_Y value
15 Draft Angle Yes Angle value
16 User Data flag Yes User flag
0. Lambda Research Data
(Read Only)
1. User added data 
(Read/Write)
11 Blank Line Ignored
12 Column Head- Ignored Varies by Geometry Type
ers
13+ Data Yes Column Data
Last Save Data Optional SAVE-DATA
This may be placed between multiple properties
and is used by the Tools|Database|Import com-
mand

Texture File Format


The following RepTile geometry types can be used in a Texture file:
• Sphere
• Cone
• Hip Roof
• Ellipsoids
• Enhanced Prism
• Log
• Flattened Cone
• Pointed Cone
• DMD Mirror
• Block
• Chiseled Log
• Torus
• Polygon
• Pyramid
• Circular Hip Roof
The full (x, y, z) rotation for Log geometry allows logs to be holes and to be at
oblique angles to the base plane. This adaptability allows for undercut on the base
plane. Undercut means there is a void (i.e., air gap) between successive regions
of the object's volume in the direction of the base plane surface normal. While this
configuration is realizable, the manufacture, especially with small replicated
geometry (e.g., backlit display panel) is prohibitively expensive. Thus, it is left to
you to ensure that any potential undercut is desired. Simply said, there is no
checking within TracePro to warn about potential undercut.
Additionally, Texture Files and thus Textured RepTile Properties can have a
mixture of the geometry types. This allows for the inclusion of different geometry

TracePro 2022 User’s Manual 7.111


Technical Reference

types applied to a single surface in a TracePro model. Also, in the next section,
Mixed Bump and Hole RepTiles, these Textured RepTile Properties can
concurrently contain both holes and bumps. Textured RepTile allows for great
control in not only the position and size of the features, but it also allows control of
the shape and orientation.
In the next three subsections the characteristics of the Texture File are provided:
• Texture File syntax,
• Textured RepTile Geometry type values, and
• Parameter designations for each Geometry type

Texture File Syntax


The syntax for a Texture File is shown below with detailed descriptions in
Table 7.17. The parameter items inside < > indicate data that must be supplied by
the user within the Texture File.

RepTile Texture File


Filename:<Filename>
Date:<Date>
Version:<VersionNumber>
Texture Type:<TextureType>

Texture Features
<Type1><BumpSign1><Param11><Param12><Param13>…<Param1M>
.
.
.
<TypeN><BumpSignN><ParamN1><ParamN2><ParamN3>…<ParamNM>

7.112 TracePro 2022 User’s Manual


Property Import/Export Formats

TABLE 7.17. Texture File Format

Line
# Parameter Description Format
1 File Header RepTile Texture File String

2 Filename Filename of the current file. The String


standard file type is of type *.txt.
There is a space after the colon.
3 Date The date the file was created or String
last modified. Not important for
operation, but allows the user to
maintain some level of version
control. There is a space after
the colon.
4 VersionNum- The version number of this file for Double
ber control of future updates to Rep-
Tile Texture Files. Currently Ver-
sion 1.0. There is a space after
the colon.
5 TextureType The Feature Geometry Type for Integer
the Texture Features contained
within the file. See Table 7.18 for
the allowed values. There is a
space after the colon.
6+ Data For the following there are N (= number of Fea-
tures) instances per file. The # designation in the
first column parameter list indicates the feature
number.
Type# This is the Feature Geometry Integer
type for the individual Feature.
See Table 7.18 for more details
BumpSign# This is the bump (= 1) or hole (= - Integer
1) for the individual Feature.
Param#@ This is parameter @ for Feature Double
#, where the values for @ are
dependent on the Type# and are
detailed in Table 7.19.

Textured RepTile Geometry Type Values


The five types of Textured RepTile shapes have a numeric designator as the first
number for each Data line within the Texture File. In Table 7.17 this Geometry
Type value is listed as Type#. Table 7.18 provides the integer for each Geometry
Type. If a Texture File is of one Geometry Type, Line 5 in the Texture File (see
Table 1) should indicate such. If a Texture File contains a hybrid of several
Geometry Types, then the value of 0 should be used for TextureType in the
Texture File.

TracePro 2022 User’s Manual 7.113


Technical Reference

TABLE 7.18. Textured RepTile File geometry type values.

Geometry Type Value Description


Hybrid 0 Only used for Line 5 (i.e., TextureType) in the Tex-
ture File. This value indicates that the file contains
multiple Geometry Types.
Cone 2 As per Standard RepTile
Sphere 3 As per Standard RepTile
Hip Roof 4 As per Standard RepTile
Ellipsoid 8 As per Standard RepTile
Log 9 As per Standard RepTile
Enhanced 10 As per Standard RepTile
Prism
Flattened 11 As per Standard RepTile
Cone
Pointed Cone 12 As per Standard RepTile
DMD Mirror 13 As per Standard RepTile
Block 14 As per Standard RepTile
Chiseled Log 15 As per Standard RepTile
Torus 16 As per Standard RepTile
Asphere 17 As per Standard RepTile
Polygon 18 As per Standard RepTile
Pyramid 19 As per Standard RepTile
Circular Hip 20 As per Standard RepTile
Roof

Parameter Designations for each Geometry Type


As indicated in Table 1 there are several parameters that describe an individual
Feature of a designated Geometry Type. The number of parameters is dependent
on the Geometry Type. Table 7.19 provides a listing of the parameters - indicating
what the parameter denotes in the Feature geometry. All of the parameters are in
millimeters or degrees and are in Double data type. For example, for a Sphere
Feature, there must be four additional values on each data line beyond the
Geometry Type and Bump Sign. These parameters are x-center, y-center, radius,
and height/depth.

7.114 TracePro 2022 User’s Manual


Property Import/Export Formats

TABLE 7.19. Textured RepTile file parameter values for each geometry type.

Parameter Number (Param@)

Geometry
Type 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Cone x cen- y cen- height/ end cone cham- cham-
ter ter depth radius angle fer fer
height angle
Sphere x cen- y cen- radius height
ter ter /
depth
Hip Roof x cen- y cen- height/ y y x x ori-
ter ter depth width angle width angle ent.
angle
Ellipsoid x cen- y cen- cen- x y z x y z
ter ter ter ht/ radius radius radius rotate rotate rotate
dpth
Log x cen- y cen- cen- length end1 end2 x y z radius axis
ter ter ter ht/ radius radius rotate rotate rotate ratio rotate
dpth
Enhance x cen- y cen- x y height/ x0 x1 y0 y1 ori- y0 y1 y0 y1
d prism ter ter width width depth angle angle angle angle ent. peak peak trough trough
angle radius radius radius radius
Flattened x cen- y cen- height/ end cone peak trough
Cone ter ter depth radius angle radius radius
Pointed x cen- y cen- height/ cone peak trough
Cone ter ter depth angle radius radius
DMD Mir- x cen- y cen- height/ DMD DMD cen- post tilt orien-
ror ter ter depth thick- width ter width (deg) tation
ness hole (deg)
width
Block x cen- y cen- height/ x y z x y z
ter ter depth width width width rotate rotate rotate
Chiseled x cen- y cen- height/ cone end1 end2 end1 end2 radius orien-
Log ter ter depth length radius radius tilt tilt ratio tation
(deg)
Torus x cen- y cen- height/ major minor
ter ter depth radius radius
Asphere x cen- y cen- radius curva- conic A1 A2 A3 A4 A5 A6 A7 A8
ter ter ture con-
stant
Polygon x cen- y cen- radius depth/ thick- no. of x y z
ter ter height ness sides rotate rotate rotate
Pyramid x cen- y cen- pyra- no. of orien-
ter ter mid sides tation
angle (deg)
(deg)
Circular x cen- y cen- height/ inner width angle angle
Hip Roof ter ter depth radius 0 1

TracePro 2022 User’s Manual 7.115


Technical Reference

7.116 TracePro 2022 User’s Manual


The Scheme Language

CHAPTER 8 Using the Macro Language

The Scheme Language Standard Expert

TracePro includes the Scheme programming language, a powerful and flexible


macro language for manipulating views, editing geometry, and writing macro
programs, including looping and branching. There are thousands of macro
commands available. To access the online documentation of macro commands,
select Help|Macro Reference from the TracePro menu bar. The Macro
Reference is designed to work like a help file; see Figure 8.1.
SCHEME, a dialect of the LISP language, was developed at MIT. LISP is used
most often for artificial intelligence applications.
An advantage of the Scheme language for software developers is easy
extensibility. TracePro is designed so that almost anything you can do in
TracePro’s user interface, you can also do in a Scheme command. A good way to
get started with Scheme is to use the Macro Recorder feature in TracePro -
Macros|Recorder - to see the Scheme commands corresponding to user input.

FIGURE 8.1 - The TracePro Macro Reference, Contents

TracePro 2022 User’s Manual 8.1


Using the Macro Language

Notepad++ Standard Expert

Overview
The Notepad++ text editor is available for creating and editing scheme macro
files. Notepad++ is a full-featured, open-source, programmer’s editor that has a
language template for Scheme files. Notepad++ has been enhanced by Lambda
Research with TracePro scheme extensions. You can start Notepad++ from the
Macros menu in TracePro, or from Windows in the usual way.
Notepad++ has its own Help system.

Enabling auto-complete in Notepad++


TracePro installs Notepad++ during its installation process. However, auto-
complete of commands is not enabled by default upon installing Notepad++. to
enable auto-complete in Notepad++, select Settings|Preferences and select
Auto-completion. Finally, check the Enable auto-completion on each input
checkbox. You can also change the number of characters typed before auto-
completion suggestions are displayed by changing the From ___th character
setting.

Sending Scheme commands to TracePro


You can send a selection of code in a scheme file to TracePro for immediate
execution. To do this, first select the lines you wish to send, then select
Plugins|TracePro|Send, or Ctrl-F5. If nothing is selected, the entire file will be
sent to TracePro.

Macro Recorder Standard Expert

The Macro Recorder captures the TracePro commands used during a session
and stores the equivalent Scheme commands to a file. The stored file can be run
by TracePro using the Macros|Load command to recreate the system and/or
results stored between the Macros|Recorder|Start and
Macros|Recorder|Stop commands. The file can also be edited and modified to
return new results or become a function containing input parameters.

Recording States
During a Macro Recording the Start menu is altered to allow interruption in the
recording process. The following options are displayed:

Start No macro file is open. Press Start to create a new macro.


Pause A macro file is open and commands are being stored to file.
Press Pause to keep the current Macro file but temporarily halt
recording.
Resume A macro file is open but currently not receiving commands.
Press Resume to resume recording.
Stop A macro file is open and may be receiving commands as
stated above. Press Stop to halt recording of the current
macro and close the file.

8.2 TracePro 2022 User’s Manual


The Scheme Language

Macro Format and Example


Selecting the Macros|Recorder|Start menu opens the Macro Recorder dialog.
The Macro Name is the function to be defined and stored in the file given by File
Path. Select Record view change to capture the Model and Window commands
if you are changing between different Models or Views.

Figure 1 Macro Recorder

The following output was generated from a new Model Window. The GUI
commands were used to create a sphere, apply the Schott BK7 material property,
and trace the default ray grid.

(define Macro1
(lambda ( )
(define Macro1_ID_1
(geometry:sphere 10))
(property:apply-name Macro1_ID_1 "Sphere 1")
(edit:move Macro1_ID_1 0 0 12)
(property:apply-material (entity 19) "SCHOTT" "BK7" (gvector 0 0
0))
(raytrace:set-grid-source-flag "Grid Source 1" #t)
(raytrace:all-sources)
))

To recall this function, load the file using Macros|Load and select Macro1.scm,
and enter the command in the Macro Window “(Macro1)”. You can add arguments
to use the recorded commands as a template or use the macro as recorded to
return to a known model state.

Macro Command Examples


The following sections give a few examples of how Scheme commands can be
used in TracePro. There are two ways to use Scheme commands:
1. As part of a Scheme program stored in a text file (with default extension
*.scm), or

TracePro 2022 User’s Manual 8.3


Using the Macro Language

2. entered at the command line at the bottom of the message/macro window.


All the commands in the following sections can be entered at the command line to
illustrate their effect.

Running a Macro Command from the Command Line


To issue a macro command, open the Macro Window that lets you run commands
from the command line: select from the Macros menu, Macros|Messages/
Macros.

To enter a command, type into the one-line text box at the bottom of the Message/
Macro window, Figure 8.2. To run a command, select the Execute button.
Note: All commands must be enclosed in parentheses.
The Message/Macro window can be re-sized by dragging a corner or edge with
the mouse. It can be maximized or minimized using standard Windows buttons
and menus.

FIGURE 8.2 - The Message/Macro Output Window

Running a Scheme Program Stored in a File


To run a macro program, open its *.scm file in TracePro using Macros|Load. The
file is loaded, then executed. Informative messages can be displayed in the
Message/Macro window. This is the same window in which informative messages
are displayed during ray tracing.

8.4 TracePro 2022 User’s Manual


Creating Geometry

FIGURE 8.3 - The Macro|Load/Execute Dialog Box.

Creating Geometry
Solid objects are created using the geometry class, e.g.,
(geometry:cylcone) or (geometry:block). Solids can also be named,
so that they can be manipulated later, for example, moved, rotated, or used with a
Boolean operation.

Create a solid block:


(geometry:block (position 0 0 0) (position 20 30 40))
This creates a block with one corner at (0,0,0) and the other at (20,30,40),
oriented parallel to the coordinate axes.

Create a solid block named blk1:


(define blk1(geometry:block(position 0 0 0)(position 20 30 40)))
This creates a block with one corner at (0,0,0) and the other at (20,30,40),
oriented parallel to the coordinate axes with the name blk1. Naming an object lets
you perform additional operations on it. Names are active only during the macro
command session. They are not saved with the model.

Create a solid cylinder:


(geometry:cylcone 30 10)
This creates a solid cylinder with one end at (0,0,0), length 30, and a radius of 10.
The axis of the cylinder is along the z axis.

Create a solid elliptical cylinder:


(geometry:cylcone 30 10 5)
This creates a solid elliptical cylinder with one end at (0,0,0), length 30, and
elliptical radii of 10 and 5. Note that the only difference between this command

TracePro 2022 User’s Manual 8.5


Using the Macro Language

and the previous one is the extra number in the argument list. The scheme
interpreter determines from context that it should create an elliptical cylinder.

Create a solid cone:


(geometry:cylcone 30 10 10 5)
This creates a solid cone with one end at (0,0,0), the other end at (20,30,40), with
a radius of 10 at the first end and 5 at the second end.

Create a solid elliptical cone:


(geometry:cylcone 30 10 5 5)
This creates a solid cone with one end at (0,0,0), with a major radius of 10 at the
first end, minor radius of 5 at the first end, and major radius of 5 at the second
end. The elliptical ends have the same ratio (2) between the major and minor
axes.

Create a solid torus:


(geometry:torus 10 5)
This creates a solid torus with center at (0,0,0), a major radius of 10 and a minor
radius of 5. The axis of symmetry of the torus is along the z axis. When the major
radius is larger than the minor radius, a doughnut-shaped solid is created. When
the major radius is smaller, an apple-shaped object is created. When the major
radius is negative, a lemon-shaped solid is created.

8.6 TracePro 2022 User’s Manual


Boolean Operations

Boolean Operations
You can perform Boolean operations from the command line as well.

Boolean subtract
(edit:boolean-subtract solid1 solid2)
This subtracts the solid named solid2 from the solid named solid1. The
resulting solid is named solid1. If more than two object names are given, all the
subsequent objects are subtracted from the first one.

Boolean unite
(edit:boolean-unite solid1 solid2)
This unites the solid named solid2 with the solid named solid1. The
resulting solid is named solid1. If more than two object names are given, the
union of all the objects is computed.

Boolean intersect
(edit:boolean-intersect solid1 solid2)
This intersects the solid named solid2 with the solid named solid1. The
resulting solid is named solid1. If more than two object names are given, the
intersection of all the objects is computed.

Macro Programs
You can write your own macro programs and store them in ASCII text files. The
default extension for scheme files is scm. You can create a file using any text
editor. You run a stored macro program by opening the file using the Macros|Load
menu selection within TracePro.
You can find some example macro programs on the Lambda Research web site
(http://www.lambdares.com) in the TracePro Technical Support section, under the
hotlink name: Examples.

Accessing TracePro Menu Selections using Scheme


Many functions that can be performed using TracePro’s user interface can also be
performed by scheme commands. TracePro commands are grouped by the
TracePro menu that they mirror.
The entire collection of macro commands are referenced in the online Macro
Reference, which is available from the Start menu.

For more information on Scheme


See the Scheme home page at MIT:
http://www-swiss.ai.mit.edu/scheme-home.html (very technical)
and the reference book The Scheme Programming Language, Fourth Edition, by
R. Kent Dybvig (MIT Press). The book is available from booksellers, but the

TracePro 2022 User’s Manual 8.7


Using the Macro Language

author has also generously arranged for the entire text to be available online at
http://www.scheme.com/tspl4/

TracePro COM Interface


TracePro includes a COM (Component Object Model) programming interface to
allow TracePro to communicate with other Windows software. The COM support
in TracePro allows you to write programs that control the execution of TracePro.
This is done by passing strings containing Scheme commands to TracePro via
the COM interface.
You can use any programming language that supports COM to create instances
of TracePro COM objects and call the objects methods. The programming
languages most commonly used are: Visual Basic, C# and C++.
This section assumes the reader is already familiar with COM programming.

TracePro COM
TracePro is an out-of-process COM server for use in COM clients running on the
same computer as TracePro. Clients can create COM objects whether the server
is running or not. The COM client will be able to start the registered release of
TracePro. When TracePro is started via COM, the startup options, auto load
scheme and check for updates will not be run. The COM programmer can use
COM function calls to implement any desired startup behavior.

TracePro Type Library


The type library TracePro.tlb will contain the COM objects and interfaces for the
different editions of TracePro. There is one type library installed with TracePro in
the Program Files directory. You must import this type library into the C++ COM
client programs that you create.
For Visual Basic and C# programs, Visual Studio reads the registry to find the
installed typelibs and will list these as references. You will need to add a reference
to the TracePro type library which will be listed as “TracePro Type Library” version
1.0.

TracePro<edition> Object
The TracePro<edition> COM objects are registered in the Windows registry and
can be used to programmatically control TracePro. The edition can be either ST
(TracePro Standard) or XP (TracePro Expert). Each TracePro edition executable
will have a unique TracePro object that will provide methods to interact with
TracePro. Use the version independent programmatic identifier for the edition of
TracePro that is licensed, use TracePro.TraceProXP for TracePro Expert or
TracePro.TraceProST for TracePro Standard. The edition COM objects implement
the ITracePro interface to provide methods to interact with TracePro.
System calls to GetActiveObject will return the TracePro edition object for the first
instance of TracePro that was running. If TracePro is not running it will return an
error. Systems calls to CreateInstance will create a new object if one doesn’t exist
(thus starting TracePro) or will return the active TracePro edition object. The
active TracePro edition object will be from the instance of TracePro edition that
was started first. The TracePro edition object will also be registered with a

8.8 TracePro 2022 User’s Manual


TracePro COM Interface

moniker that will allow the unique instance of the object to be found. The name will
be TracePro_PID_ and where PID is the process id for the instance of TracePro.
You can use this moniker name to connect to a specific instance of TracePro if
you don’t want the first instance.

TracePro Interface
HRESULT GetTraceProModulePathname( [out, retval] BSTR* Pathname );
This method will return the full pathname to TracePro.
HRESULT GetVersionString([out, retval] BSTR *pVersion );
HRESULT Returns the string “Major.Minor.Release.Build”.
HRESULT ExecuteSchemeString( [in] BSTR Expressions, [out] BSTR* pResult,
[out, retval] LONG* pNestLevel );
TracePro will execute the scheme code in Expressions and wait for it to complete.
This behaves like the command line in the TracePro Message/Macro window.
Expressions: A string that contains the scheme code to execute. This string can
represent several expressions and end with an incomplete scheme expression.
pResult: This will contain the string returned by the last complete command in
Expressions or an error string if there was an argument error in a TracePro
scheme command in Expressions. The processing of the Expressions will stop on
an error or exception.
pNestLevel: This will contain the number of right parentheses that are required to
complete an incomplete expression. It will be 0 if the last expression was
complete or -1 if there was an error.
NOTE: We detect COM argument errors from TracePro scheme commands but
ACIS prints the error messages and doesn’t provide a way for us to know that
there was a problem in ACIS scheme command or general scheme errors like the
unbound variable.
HRESULT BackgroundExecuteSchemeString( [in] BSTR Expressions );

TracePro will execute the scheme code in Expressions and return immediately
before the scheme processing is complete.
Expressions: A string that contains the scheme code to execute. This string can
represent several expressions and end with an incomplete scheme expression.
HRESULT LoadSchemeFile( [in] BSTR SchemeFile, [out, retval]
VARIANT_BOOL* pSuccess );
TracePro will load and execute SchemeFile.
SchemeFile: Pathname to a file that contains scheme code.
pSuccess: This will be true if the scheme code loads and executes without error.
This will return false if there is an error and there should be an error message in
the TracePro output window.
HRESULT IsUserInControl([out, retval] VARIANT_BOOL *pUserInControl );
This method returns true if the TracePro user interface is displayed.
HRESULT AllowUserControl();

TracePro 2022 User’s Manual 8.9


Using the Macro Language

The default MFC application that is also a COM server will not display the user
interface when a COM object is created when the application is not running. Use
this command to make the TracePro user interface visible if it wasn’t already.
NOTE: All COM objects will be destroyed if the user chooses to exit TracePro
while the user interface is displayed and the user is in control.

Changing the TracePro COM server


If you would like to run a different installed release you will need to use
TracePro.exe in the installation directory to register the COM objects. As
administrator run:
TracePro.exe /register
If you install an Early Visibility (EV) release of TracePro and want your COM
clients to communicate with the official release you will need to re-register the
official release.

TracePro DDE Interface


TracePro may be controlled by another application using it as a DDE server. All
DDE Service, Topic and Item names are insensitive to case. The DDE Execute
command strings are also case insensitive. Since much of the interaction is based
on sending Scheme commands, the interface is documented along with the
Macro functionality.

Introduction
DDE (Dynamic Data Exchange) is a Windows protocol to share information
between different programs. DDE uses a hierarchy of three names, the SERVICE,
the TOPIC and the ITEM. A DDE CONVERSATION is established using the
service and topic names as a pair. The item part of the name is used to identify the
particular data or command being requested by the client once a conversation is
established.
To establish a conversation a DDE client specifies the service/topic name pair it
wishes to connect to. Windows broadcasts the request to all top level windows.
The first server to accept is connected to the client and so a conversation is
established. The application that initiates the conversation is called the client. The
application that responds to the client application is called the server.
During a DDE conversation, the client and server applications exchange data
concerning items. An item is a reference to data that is meaningful to both
applications in a conversation. Either application can change the item during a
conversation.
Just as the client application initiates the establishment of a conversation, it also
initiates all the transactions. It can request data from the server as a once off (a
REQUEST transaction), request being kept up to date about an item of data (an
ADVISE or NOTIFY transaction), give commands to the server (an EXECUTE
transaction) and send unsolicited data to the server (a POKE transaction). The
client associates with all these transactions the item part of the identification. It
informs the server of the data required by the client in a request transaction, the
action to be taken by the server in an execute transaction or the data being
passed to the server in a poke transaction.

8.10 TracePro 2022 User’s Manual


TracePro DDE Interface

It is also possible to use the item part of the name as the data itself, with the topic
name indicating the context in which the data is to be used.

The Service Name


Every application that can be a DDE server has a unique service name. The
service name is usually the application's executable filename without any
extension. Service names are not case sensitive. Here are some commonly used
service names:
• The service name for TracePro is TracePro.
• The service name for OSLO is OSLODDE.
• The service name for MATLAB is Matlab.
• The service name for Microsoft Word for Windows is WinWord.
• The service name for Microsoft Excel is Excel.

The Topic
The topic defines the subject of a DDE conversation and is usually meaningful to
both the client and server applications. Topic names are not case sensitive.
TracePro topics are System and Scheme and are described below.

The Item
Each topic supports one or more items. An item identifies the data being passed
during the DDE conversation. TracePro items are not case sensitivity. The
scheme items are simply TracePro macro commands passed to the Server for
execution. The command results may be retrieved by the client using a
REQUEST transaction or simply sent to TracePro via a EXECUTE transaction.

Clipboard Formats
DDE uses the Windows clipboard formats for formatting data sent between
applications. TracePro supports only Text format for its Server mode.

TracePro DDE Server


If you request "SysItems" on the System topic, you get a list of items available on
that topic:
• SysItems - returns a tab separated list of items.
• Topics - returns "System" and "scheme" topics.
• Formats - returns the available formats for data transfer. The Text format is the
only supported format for TracePro.
• TopicItemList - returns a tab separated list of items for the current Topic.
The format Text (CF_TEXT) must be used for all requests on the System topic.

Establishing a Conversation
When you access TracePro as a server, you must specify its service name and
one or more topics to establish a CHANNEL. TracePro can support multiple
channels from one or more applications. Generally the System topic is used to

TracePro 2022 User’s Manual 8.11


Using the Macro Language

obtain information on the topics and items supported for a particular server. The
Scheme topic does not provide any specific Items but will attempt to execute the
text sent to the server as an TracePro macro command. If the Request transaction
is used, the result of the TracePro command will be returned as a text string.

Excel 97/2000 Example


The following example illustrates a DDE conversation between MS Excel and
TracePro. The DDEInitiate command is used to open Channels for the Scheme
topic. A DDEExecute is used to open a new model by sending a command to
TracePro with no return value. The Conversation is ended with the DDETerminate
commands.
Public Sub DDEtoTracePro()

Dim strApp As String


Dim strTopic As String

strApp = "TracePro"
strTopic = "scheme"

channelNumber = Application.DDEInitiate(strApp, strTopic)

Application.DDEExecute channelNumber, "(file:new)"

Application.DDETerminate channelNumber
End Sub

8.12 TracePro 2022 User’s Manual


RepTile Examples

CHAPTER 9 Examples

RepTile Examples Expert

In general, the steps involved in using RepTile surfaces consist of first creating a
RepTile surface property within TracePro and then applying that property to a
plane surface in your TracePro model. All the examples in this section are similar
in construction. You should choose an example that is most like the model you
wish to create and follow through the steps for creating the example.

Fresnel lens
In this example we will create a Fresnel lens. Some of the important features of a
Fresnel lens are shown in Figure 9.1
.

FIGURE 9.1 - Important construction features of positive and negative


Fresnel lenses.

In order to begin analyzing a Fresnel lens, you will need to acquire data about the
desired facet angles. If you are analyzing a lens that has already been fabricated,
this data will be available from the manufacturer. If you are analyzing a Fresnel
lens that is in its design stage, you will have to get the facet angle data from
calculations (possibly from a specialized optical design program) outside of
TracePro.
For purposes of this exercise, we have supplied an example file containing facet
angle data. The data for the angular facets of the Fresnel lens example is
contained in the Fresnel Lens Arcsecs.txt file, which can be found in the Technical
Support section of the Lambda Research web site. This text file contains one
whole number per line – the number is the Fresnel lens facet angle in arcseconds.
In order to use this file, we will need to convert the angles to degrees. To examine
this file, open it using a spreadsheet program such as Microsoft Excel. The facet
angles increase from the center to the edge of the lens. In order to calculate the
minimum thickness we need for the substrate, we need to know the largest facet
angle. This is the last angle in the file. You can quickly go to the last row in the
spreadsheet in Excel by pressing <Ctrl -  on your keyboard. The Excel screen
should look like Figure 9.2, showing that there are 333 rows in the spreadsheet
and the last facet angle is 171682 arcsec or 47.68944 degrees. Assuming that
each facet has a width of 0.5 mm, the depth of the last facet is 0.5 mm x
tan(47.68944°) = 0.549 mm. We can make the substrate 2 mm thick, and the last

TracePro 2022 User’s Manual 9.1


Examples

facet will still have a base thickness of almost 1.5 mm (substrate thickness –
tallest facet height = base thickness).

FIGURE 9.2 - The Fresnel Lens Arcsecs.txt file as it appears in Microsoft


Excel.

First we will create a RepTile Surface property that describes the Fresnel lens.
Open the Reptile Property Editor by selecting Define|EditPropertyData|
RepTile Properties. The editor appears as in Figure 9.3.

FIGURE 9.3 - The RepTile Property editor with no property selected.

9.2 TracePro 2022 User’s Manual


RepTile Examples

To add the new property:


1. Press Add Property, and enter a name, for example Fresnel Lens Example,
2. select Fresnel from the Geometry Type drop-down list in the pop-up dialog,
3. select Rings from the Tile Type drop-down list in the dialog,
4. select Variable Rings from the Variation Type drop-down list in the dialog,
5. press OK to create the property.
The RepTile Property Editor will display the property and provide additional inputs
as shown in Figure 9.4.

FIGURE 9.4 - A template for the Fresnel Lens Example RepTile property.

6. Continue to enter the property data by entering 0.5 in the Ring Width box (the
ring width in mm).
We now have a template for creating the Fresnel Lens RepTile property. To fill in
the facet angle and draft angle data, we will export this property to a text file and
use a spreadsheet program.
To export the property, first select File|Save to save the property, then select
File|Export Property to save the property in a text file. Open the text file using
a spreadsheet program (Microsoft Excel was used in this example). The opened
file should appear as in Figure 9.5

TracePro 2022 User’s Manual 9.3


Examples

FIGURE 9.5 - The Fresnel Lens Example RepTile property exported text file
after opening in Excel.

9.4 TracePro 2022 User’s Manual


RepTile Examples

With the Fresnel Lens Arcsecs.txt file open in Excel, make a second column that
is calculated from the first column. The second column should be the facet angle
in degrees, obtained by dividing the first column by 3600. The first few rows of the
Fresnel Lens Arcsecs.txt file should appear as in Figure 9.6.

FIGURE 9.6 - The Fresnel Lens Arcsecs file with a second column
containing facet angles in degrees.

TracePro 2022 User’s Manual 9.5


Examples

Select the entire column B, copy it, and paste it to cell A19 of the Fresnel Lens
Example property file using Paste Special and specifying Values. (You can select
the column quickly by selecting cell B1 in Fresnel Lens Arcsecs and pressing
<Shift - Ctrl -  to select the column). Enter an angle of 2 in the second column
for the Draft Angle. Each facet can have a different angle but we will use a
constant 2 degrees for this example The property should appear in Excel as
shown in Figure 9.7
.

FIGURE 9.7 - The completed Fresnel Lens Example as shown in Excel.

9.6 TracePro 2022 User’s Manual


RepTile Examples

Now save the Fresnel Lens Example.txt file from Excel and close it. Switch back
to TracePro and select File|Import Property with the RepTile Property Editor
open. Open the Fresnel Lens Example.txt file to import it. The editor window
should appear as in Figure 9.8.

FIGURE 9.8 - The completed Fresnel Lens Example property after importing
into the Property Editor.

This completes the definition of the Fresnel Lens Example in the Property Editor.
Close the Property Editor, and choose to save your data when the appropriate
pop-up window appears.

TracePro 2022 User’s Manual 9.7


Examples

Now we are ready to make an object and apply the RepTile property we have just
created. First we need to figure out the dimensions the object should have. We
already know that it should be 2 mm thick. We also know that there are 333 facets
of width 0.5 mm, so the radius of the outermost facet is 333 x 0.5 mm = 166.5 mm.
If we use a square boundary for the Fresnel lens, the largest it can be is 166.5 mm
x 2 = 235 mm on a side. We also must have a margin around the RepTile
Surface cell boundary to allow rays to escape properly. Therefore we will make an
object that is 240 mm x 240 mm, and 2 mm thick.
7. In TracePro, using the Geometry|Primitive Solid dialog box, insert a block
with dimensions as shown in Figure 9.9.

FIGURE 9.9 - Insert a block into a TracePro model as a substrate for the
Fresnel lens.

8. Using the Apply Properties dialog box, apply the material property pmma from
the Plastic catalog to the block.
9. Now select the –z surface of the block and apply the RepTile surface property
using the RepTile tab in the Apply Properties dialog box. Fill in the values
shown in Figure 9.10.
This puts the center of the Fresnel lens at the center of the block surface.

9.8 TracePro 2022 User’s Manual


RepTile Examples

FIGURE 9.10 - Insert a block and apply the Fresnel Lens Example RepTile
property to it.

The Fresnel lens is now complete. Note that there will be no visual indication in
the model window that the RepTile surface properties have been applied unless
the View|Display RepTiles option is enabled. The System Tree will show the
Fresnel Lens Example property on the appropriate surface. The facets are
defined over a 235 mm x 235 mm square area within a 240 mm x 240 mm
surface.
Next, we’ll trace some rays through the Fresnel lens.
10.Define a square grid of rays 119 x 119 mm half-widths with a rectangular grid
of 100 x 100 rays as shown in Figure 9.11.
The completed ray-trace is shown in Figure 9.12. We see that the focal length of
this lens is about 310 mm.

TracePro 2022 User’s Manual 9.9


Examples

FIGURE 9.11 - Modified portion of Grid Source dialog for Rectangular


raytrace.

FIGURE 9.12 - Completed ray-trace of Fresnel lens example.

9.10 TracePro 2022 User’s Manual


RepTile Examples

Conical hole geometry with variable geometry, rectangular tiles and


rectangular boundary
In this example we will create a surface tiled with conical holes and rectangular
tiles. We will create a conical hole property with the following dimensions:
• Cone end radius = variable by row, from 0.1 mm to 0.2 mm in steps of 0.001
mm.
• Cone height = 0.03 mm.
• Cone angle = 0.
• Chamfer height = 0.02 mm.
• Chamfer angle = 50°.
• Rectangular tiles, 0.25 mm x 0.25 mm.
These dimensions dictate that there will be 101 rows. Each row is 0.25 mm high,
so the total “y height” of the tiles will be 101 x 0.25 mm = 25.25 mm.
Now we will create the RepTile surface property.
1. Open the RepTile Property Editor by selecting
Define|EditPropertyData|RepTile Properties. The editor appears as in
Figure 9.3 on page 9.2.
2. Press Add Property and enter a name, for example Conical Hole Example,
3. select Cone from the Geometry Type drop-down list,
4. select Rectangles from the Tile Type drop-down list,
5. select Variable rows from the Variation Type drop-down list,
6. and click OK. (See Table 9.13)

FIGURE 9.13 - Enter New RepTile Property dialog for Conical Hole Example.

7. In the Tile Parameters area, enter 0.25 for both the Width and Height values.
8. Click the Bump button and observe that it changes to Hole, specifying “hole”
geometry.

TracePro 2022 User’s Manual 9.11


Examples

9. Enter the geometry values above into the appropriate columns in the table.
The entries should appear as in Figure 9.14.

FIGURE 9.14 - Completed template for Conical Hole property example.

We now have a template for creating the Conical Hole property. To fill in the
geometry data, we will export this property to a text file and use a spreadsheet
program.
To export the property, first select File|Save to save the property, then select
File|Export Property to save the property in a text file. Open the text file using
a spreadsheet program (Microsoft Excel in this example). The opened file should
appear as in Figure 9.15.

9.12 TracePro 2022 User’s Manual


RepTile Examples

FIGURE 9.15 - The Conical Hole Example RepTile property exported text file
after opening in Excel.

10.Fill in the End Radius column, increasing the value by 0.001 with each
additional row, until you get to 0.2. (You can do this quickly by putting the
formula =A20+.001 in cell A21, then copying cell A21 down to fill in all the
values.)
11. Copy the other columns down until you fill in the table.
Figure 9.16 shows the first few rows and the last few rows of the completed
Conical Hole Example.txt file.

TracePro 2022 User’s Manual 9.13


Examples

FIGURE 9.16 - The Conical Hole Example.txt file with all values filled in.

12.Now save the Conical Hole Example.txt file from Excel and close it.
13.Switch back to TracePro and select File|Import Property from the Property
Editor.
14.Open the Conical Hole Example.txt file to import it.
The editor window should appear as in Figure 9.17.

9.14 TracePro 2022 User’s Manual


RepTile Examples

FIGURE 9.17 - The completed Conical Hole Example property after


importing into the Property Editor.

This completes the definition of the Conical Hole Example in the Property Editor.
Close the Property Editor, and choose to save your data when the appropriate
pop-up window appears.

TracePro 2022 User’s Manual 9.15


Examples

Now we are ready to make an object and apply the property we have just created.
First we need to figure out the dimensions the object should have. An appropriate
thickness is 2 mm. We also know that total height of the rows is 25.25 mm. We are
free to choose the width - let’s choose the width as 100 mm. We also must have a
margin around the RepTile surface cell boundary to allow rays to escape properly.
Therefore we will make an object that is 30 mm x 105 mm, and 2 mm thick,
oriented so that the 30 mm dimension is along the z axis.
15.In TracePro, using the Geometry|Primitive Solid dialog box, insert a block
with dimensions as shown in Figure 9.18.

FIGURE 9.18 - Insert a block into a TracePro model as a substrate for the
Conical Hole surface.

16.Using the Apply Properties dialog box, apply the material property pmma from
the Plastic catalog to the block.
17.Now select the +y surface of the block and apply the RepTile property using
the Apply Properties dialog box.
18.Fill in the values shown in Figure 9.19. This puts the (0,0) tile at the -z edge of
the rectangular boundary.

9.16 TracePro 2022 User’s Manual


RepTile Examples

FIGURE 9.19 - Insert a block and apply the Conical Hole Example RepTile
property to it.

TracePro 2022 User’s Manual 9.17


Examples

The Conical Hole example is now complete. Note that there will be no visual
indication in the model window that the RepTile surface properties have been
applied, but the System Tree will show the Conical Hole Example property on the
appropriate surface. The facets are defined over a 100 mm x 25.25 mm
rectangular area within a 105 mm x 30 mm surface, with the first row of the
surface at z=0.125. As you go along the +z axis the row number increases and
the geometry changes. Next, we’ll trace some rays into the edge of the block.
Define a rectangular grid of rays with 50 x 0.5 mm half-widths with a rectangular
grid of 100 x 100 rays and half-angle (divergence) of 30 degrees. The completed
ray-trace is shown in Figure 9.20.

FIGURE 9.20 - Completed ray-trace of Conical Hole Example.

9.18 TracePro 2022 User’s Manual


RepTile Examples

Parameterized spherical bump geometry with staggered ring tiles


In this example we will create a surface tiled with spherical bumps in staggered
tiles. The property dimensions will be parameterized to vary as the bumps extend
outward from the center of the RepTile circular boundary. We will create a
spherical bump property with the following dimensions:
• Sphere radius = 0.05+(Iring/5) mm.
• Sphere height = Iring/2 mm.
• Ring width = 0.1 + 0.7*Iring mm.
• Each ring will have 5 segments starting at different angles = 10 * Iring.
The resulting RepTile property placed on the end of a 12 mm cylinder is shown
Figure 9.21. The parameter variable Iring starts from the center and increases by
one for each ring outward.

Bumps of increasing radius Staggered ring segments

FIGURE 9.21 - Parameterized spherical bump RepTile property. The


Boundary Radius is set to 11mm and the Depth to 1mm.

Now we will create the RepTile surface property.


1. Open the RepTile Property Editor by selecting
Define|EditPropertyData|RepTile Properties...

The editor appears as in Figure 9.3 on page 9.2.


2. Click Add Property and enter a name, for example Spherical bump,
3. select Sphere from the Geometry Type drop-down list,
4. select Rings from the Tile Type drop-down list,

TracePro 2022 User’s Manual 9.19


Examples

5. select Parameterized from the Variation Type drop-down list,


6. and click OK. See Figure 9.22.

FIGURE 9.22 - Entering a parameterized RepTile property.

Now we are going to use the Iring variable to define the Tile Parameters and
Geometry. Several of the entries will vary as a function of the ring in which the
data is evaluated. See “RepTile Parameterization” on page 3.77.
Enter the functions and values shown in Figure 9.23.

9.20 TracePro 2022 User’s Manual


RepTile Examples

FIGURE 9.23 - Completed Spherical Bump property example.

This completes the definition of the Spherical Bump Example in the Property
Editor. Close the Property Editor, and choose to save your data when the
appropriate pop-up window appears.

TracePro 2022 User’s Manual 9.21


Examples

Aperture Diffraction Example Standard Expert

In this example, we examine Fraunhofer diffraction by a circular aperture. This


example illustrates how aperture diffraction works in TracePro, and how to use
importance sampling with diffraction.
1. Define a source that creates a converging spherical wavefront.
a. Select Geometry|Reflector and select the Conic tab.
b. Insert a Conic reflector with the input parameters from Table 9.1.

TABLE 9.1. Data parameters for conic reflector

Shape
Spherical
Length: 100
Thickness: 1
Hole radius: 0
Radius: 1100
Origin: X=0; Y=0; Z= -100
Rotation: X=0; Y=0; Z=0

c. Trim the reflector by creating a cylinder that overlaps the reflector and using
the Boolean Intersect operation. Insert a cylinder with the input parameters
from Table 9.2.

TABLE 9.2. Data parameters for Boolean Cylinder tool


Major R: 55
Length: 200
Base Position: X=0; Y=0; Z=-200
Base Rotation: X=0; Y=0; Z=0

d. After using the Boolean Intersect operation on both objects, we need to


make the reflector a Surface Source to trace rays from.
e. Select the inner spherical surface of the reflector (faces the +z direction)
and use the Apply Properties dialog box to define a Surface Source with
the input parameters from Table 9.3.

TABLE 9.3. Data parameters for Surface Source


Source Type: Flux
Flux: 10 watts
Number of Rays: 25000
Angular Distribution: Normal to Surface

9.22 TracePro 2022 User’s Manual


Aperture Diffraction Example

2. Create a diffracting aperture and also an object that absorbs light that does not
pass through the aperture. To do this, select Geometry|Baffle Vane to create
a baffle vane at the origin with the input parameters from Table 9.4.

TABLE 9.4. Data parameters for Baffle Vane


Aperture Radius: 50
Tube Radius: 200
Thickness: 1
Knife Radius: 0.01
Conical angle: 0
Relative Ground Angle: 30
Position: X=0; Y=0; Z=0
Rotation: X=0; Y=0; Z=0

a. Select the new baffle vane (using the Select Object tool) and apply the sur-
face property Perfect Absorber to it (use the Define|Apply Properties
dialog).
b. Next, create a dummy object on which diffraction will occur. This object, a
short cylinder (a disk, really) fills the aperture in the baffle vane. It is import-
ant that one end of the cylinder is coincident with the aperture in the baffle
vane. In use the Insert Primitive Solid dialog box and the Cylinder/
Cone tab to enter the input parameters from Table 9.5.

TABLE 9.5. Data parameters for Diffraction disk


Major R: 50
Length: 1
Base Position: X=0; Y=0; Z=0
Base Rotation: X=0; Y=0; Z=0

c. Select the end surface of the cylinder that is located at z=0. In the Apply
Properties dialog, select the Diffraction tab, check the check box, and
press Apply. At this point, the model should look like the figure shown in
Figure 9.24.

TracePro 2022 User’s Manual 9.23


Examples

FIGURE 9.24 - The Model Window Display at the Current Step of the
Example

3. Now we need an observation surface. Use the Geometry|Primitive Solid


dialog and the Block tab to create a block with the input parameters from
Table 9.6.

TABLE 9.6. Data parameters for Detector Block


Width: X=1.1; Y=1.1; Z=1
Center: X=0; Y=0;
Z=1000.5

This puts the front face of the block at z=1000, the center of the spherical source.
Make the side that faces the reflector an Exit Surface by using the Apply
Properties dialog box.
4. Set up the Raytrace Options. Open the Raytrace Options dialog box (from
the Raytrace menu) and on the Options tab, check Aperture Diffraction.
5. For the surface source, (Apply Properties dialog box, Surface Source
selection) in the Wavelengths box, delete 0.5461 and add 10.
6. Now you are ready to trace rays and observe randomly diffracted rays. Begin a
raytrace by selecting Raytrace|Trace Rays.

9.24 TracePro 2022 User’s Manual


Aperture Diffraction Example

The rays that pass through the aperture are bent by diffraction. The rays are bent
by a random angle according to a probability distribution. The angular width of the
probability distribution depends on the location where the ray intersects the
diffracting surface; the closer to the edge, the broader the distribution.
7. After the raytrace is finished, select your exit surface and create an irradiance
map by selecting Analysis|Irradiance maps.
8. Open the Irradiance Map Options dialog box by selecting
Analysis|Irradiance Options and set the input parameters from Table 9.3.

TABLE 9.7. Data parameters for Irradiance Map Options


Quantities to plot: Irradiance
Rays to plot: Incident
Normalize to emitted: no check mark
Color Map: Grayscale on black
Count: 256
Contours: 15
Smoothing: checked
Logarithmic Scaling: checked
Other options: leave as they are

TracePro 2022 User’s Manual 9.25


Examples

You can see in Figure 9.25 how the incident rays are most highly concentrated in
the center of the map.

FIGURE 9.25 - Irradiance Map

Applying Importance Sampling to a Diffracting Surface


1. Select the spherical shell object and rotate it about the aperture center by a
small angle, say one degree.
a. Select the shell object and open the Rotate dialog by selecting
Edit|Object|Rotate.
b. Rotate the object about x axis and enter an angle of one degree.
c. Leave the rotation point at (0,0,0) and press Apply. That causes the spheri-
cal source to produce rays that focus at a point one degree below the
observation box.
2. Redo the raytrace and irradiance map to see how this change affects the
amount of light incident on the exit surface. You might see no incident rays on
your exit surface.
3. Make an importance sampling target for the diffraction surface that is
coincident with the Exit Surface forces TracePro to trace a ray onto the exit
surface.
a. To apply importance sampling to the diffracting surface, first select the dif-
fracting surface (the one lying in the z=0 plane), and open the Apply Prop-
erties dialog. Select the Importance Sampling tab, then press the Add
button to make a target with the following properties:

9.26 TracePro 2022 User’s Manual


Aperture Diffraction Example

Target: 1
Rays: 1
Direction: Toward
Shape: Rectangular
Target Center: X = 0.0; X = 0.0; Z = 1000
Normal Vector: X = 0.0; X = 0.0; Z = 1.0
Up Vector: X = 0.0; X = 1.0; Z = 0.0
Target Size: X width = 1.0; Y width = 1.0

b. Click Apply. These properties have defined the exit surface as an impor-
tance target of the diffracting surface.
4. Close the Apply Properties dialog box and open the Analysis|Raytrace
Options dialog box.
a. On the Thresholds tab, set the Flux Threshold to 1e-50. You must use a
lower threshold because importance sampling “forces” a Monte Carlo ray-
trace (which is normally random) to place a ray in a particular direction. As
a result, the flux of the rays that strike the importance target need to be
adjusted for the probability of such a ray occurring.
5. Re-run the raytrace and observe importance sampled rays striking the
observation square. The irradiance map below represents one possible result

TracePro 2022 User’s Manual 9.27


Examples

of this raytrace:

FIGURE 9.26 - Irradiance Map for Edge Diffraction with Importance


Sampling

6. Rotate the source object about the x axis by one more degree, with the origin
at (0,0,0) as the rotation point.
7. Re-run the raytrace and observe lower flux at the observation surface.

9.28 TracePro 2022 User’s Manual


Volume Flux Calculations Example

Volume Flux Calculations Example Standard Expert

To illustrate the volume flux calculation capabilities in TracePro, a simple example


will be described which entails tracing numerous rays into a block which has bulk
absorption and bulk scattering properties.
An illustration of a raytrace with 1000 rays traced into this block is shown in Figure
9.27.

FIGURE 9.27 - Example of a raytrace into a block object that has bulk
absorption and scattering properties. The Volume Flux Options window
is open, but the volume flux cells are not shown in the model.

TracePro 2022 User’s Manual 9.29


Examples

By selecting the “Show Cells” button, we can view the cells involved in the
calculation. This is shown in Figure 9.28.

FIGURE 9.28 - Example of a raytrace into a block object that has bulk
absorption and scattering properties. The cells used in the calculation
of volume flux are now shown in the model window.

The modeled object is a block that extends in Z from 5mm to 15mm. The purpose
of this calculation is to obtain an absorption profile into the block (along the z-axis)
from a penetration depth of 0.5mm and beyond. To perform this, we input the
corner positions and number of cells as shown above. We have selected 90 cells
in the Z direction which spans 9.0mm, hence our spatial resolution in Z is 0.1mm.
In order to get good sampling we need to trace many rays. But, the more rays we
trace, the more memory we will need. However, with the implementation of the
volume flux calculations, and the TracePro macro language concatenating
analyses, we can trace many rays with a small amount of memory.
To support volume flux calculations, the following nine macro commands have
been added to TracePro:
To set the user input values:
(analysis:set-volume-flux-corner-1 (position X Y Z))
(analysis:set-volume-flux-corner-2 (position X Y Z))
(analysis:set-volume-flux-cells NUM_X NUM_Y NUM_Z)
(analysis:set-volume-flux-results-filename FILENAME)

9.30 TracePro 2022 User’s Manual


Volume Flux Calculations Example

To retrieve the user input values:


(analysis:get-volume-flux-corner-1)
(analysis:get-volume-flux-corner-2)
(analysis:get-volume-flux-cells)
(analysis:get-volume-flux-results-filename)
To perform the volume flux calculations:
(analysis:volume-flux)

The scheme macro outlined in Figure 9.29 was used to perform repeated
raytraces. The random number seed was changed before each raytrace, ensuring
a different set of rays. At the conclusion of the raytrace, the volume flux
calculations were updated.

FIGURE 9.29 - Example Scheme macro used to perform repeated raytraces


and volume flux calculations.

From the scheme macro, entitled (run-volume-flux), we can see the terminating
condition for the do-loop has been set to some arbitrarily large number (1,000,000
in this case). We let the simulation run until the counter reached 18,000. Since
each raytrace consisted of 1000 rays, the total ray count for this simulation was
18,000,000. More importantly, however, the memory requirements were that for
only a single trace – 1000 rays in this case.

The output file was opened in Microsoft Excel and the results were graphed in
Figure 9.30. Notice the extremely smooth distribution of absorbed flux and

TracePro 2022 User’s Manual 9.31


Examples

cumulative absorbed flux. This can be attributed to the large number of rays being
traced, hence the sampling error has been substantially reduced.

0.03 0.8

0.7
0.025
Portion of Absorbed Flux per

0.6

Cumulative Portion of
0.02

Absorbed Flux
0.5
Volume Cell

Absorbed Flux
0.015 0.4
Integrated Absorbed Flux
0.3
0.01
0.2
0.005
0.1

0 0
1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86
Volume Cell Number

FIGURE 9.30 - Volume Flux Calculations from TracePro

9.32 TracePro 2022 User’s Manual


Sweep Surface Example

Sweep Surface Example


In this example you will create a solid cylinder, lengthen it, and then put a conical
end on it.
1. Create the cylinder by selecting Geometry|Primitive Solid and selecting
the Cylinder/Cone tab. Enter the following values for the Cylinder and then
press Insert:
2. Major Radius: 10
3. Length: 50
4. Base Position: 0, 0, 0
5. Select View|Profiles|Iso 1 to get the view shown in Figure 9.31.

FIGURE 9.31 - Cylinder

To lengthen the cylinder, first select Edit|Select Surface to turn on surface


selection mode and select the +z end plane of the cylinder. Then select
Edit|Surface|Sweep to open the Sweep Surface Selection dialog box and enter
the values as shown in Figure 9.32.

TracePro 2022 User’s Manual 9.33


Examples

FIGURE 9.32 - Sweep Surface Dialog Box

Press Apply to sweep the surface. The planar end surface of the cylinder will be
swept along the normal to the plane (i.e., along the +z axis) by 50 as shown in
Figure 9.33:

FIGURE 9.33 - Extended Planar Surface After a Surface Sweep

Now change the Distance to 10 and Draft angle to –30 as shown in Figure 9.34.
The optional draft-angle is specified in degrees. If the normal to the plane of the
surface is in the same direction as the tangent at the start of the path, the surface
profile is expanded for positive draft angles, or contracted for negative draft

9.34 TracePro 2022 User’s Manual


Sweep Surface Example

angles as it is swept along the path; otherwise, it is contracted for positive angles,
and expanded for negative angles.

FIGURE 9.34 - Sweep Surface With A Negative Draft Angle

Press Apply to sweep the surface with a negative draft angle of thirty degrees.
This creates a conical extension on the end face with a conical half-angle of 30
degrees, as shown in Figure 9.35.

FIGURE 9.35 - The Result of the Negative Draft Angle

TracePro 2022 User’s Manual 9.35


Examples

Revolve Surface Example


In this example you will create a solid cylinder, then revolve the end with a
negative draft to create a horn-shaped bend.
1. Create the cylinder by selecting Geometry|Primitive Solid and selecting
the Cylinder/Cone tab.
2. Enter the following values for the cylinder and press Insert to create the object:
3. Major Radius: 10
4. Length: 50
5. Base Position: 0, 0, 0
6. Select View|Profiles|Iso 1 to get an oblique view.
7. To bend and taper the cylinder, first select Edit|Select Surface to turn on
surface selection mode and select the +z end plane of the cylinder.
8. Then select Edit|Surface|Revolve to open the Revolve Surface Selection
dialog box and enter the values as shown in Figure 9.36.
9. Click the option “Calculate a position using the selected surface” to get the
Position information.
10. Click Revolve Surface. The face will be revolved and tapered as shown in
Figure 9.37.

FIGURE 9.36 - The Revolve Surface Selection Dialog Box

9.36 TracePro 2022 User’s Manual


Revolve Surface Example

FIGURE 9.37 - The Result of the Values in the Dialog Box

To see how a non-zero Step value affects the revolve function, first select
Edit|Undo (or press the Undo button) to undo the previous revolve. Now change
the Draft angle to zero, and the Steps value to 1. Press Revolve Surface to see
the mitered corner appear on the cylinder as shown in Figure 9.38.

FIGURE 9.38 - Result with Draft Angle Zero & Step Value 1

TracePro 2022 User’s Manual 9.37


Examples

Using Copy with Move/Rotate


TracePro can be used to create arrays of objects through the Edit|Move and
Edit|Rotate dialogs. One or more objects may be duplicated from a reference
object. The geometry and TracePro properties will be transferred to the duplicated
object.
This example will demonstrate a method to create a linear and rotational lens
array. Arrays of reflecting objects may be created in TracePro RC using this
example as a template.
1. Create a lens by selecting Geometry|Lens Element.
2. Enter the following values for the cylinder and press Insert to create the object:
3. Thickness: 3
4. Surface 1 Radius: 12

FIGURE 9.39 - Lens Element Dialog

5. Trace a fan of rays by setting the parameters of the Define|Grid Source to


an Outer radius of 25, Grid Pattern to Cross, and X points to 1. The other
options may be set to the default values.
6. Trace the rays by pressing the Trace This Rays button. See Figure 9.40.
7. Open the Edit|Move dialog.
8. Select the Lens by pressing Edit|Select|Object and clicking on the lens
with the mouse.
9. Create a second lens by entering 16 for Y Center in the Move Selection Dialog.
Press the Copy button. See Figure 9.41.
10.Create a third lens by entering -32 for the Y Center in the Move Selection
Dialog. Press the Copy button. Notice that the selection move from the first to
second and then third object.
11. Trace another grid raytrace. See Figure 9.42.

9.38 TracePro 2022 User’s Manual


Using Copy with Move/Rotate

FIGURE 9.40 - Raytrace of single lens element

FIGURE 9.41 - Move Selection Dialog

12.Next create the rotational arrays by changing the TracePro view to a XY profile
by selection View|Profile|XY.
13.If the bottom lens is not highlighted, select the bottom lens. See Figure 9.43.
14.Open the Edit|Object|Rotate dialog.
15.Enter 60 for Rotation Angle and change the Axis to About Z. See Figure 9.44.
16.Press the Copy button twice to create two more lenses.
17.Skip the top lens by changing the Rotation Angle to 120, press Copy.
18.Add one more lens by returning the Rotation Angle to 60 and press Copy.
19.The resulting Lens Array in shown in Figure 9.45.

TracePro 2022 User’s Manual 9.39


Examples

FIGURE 9.42 - Raytrace of linear lens array

FIGURE 9.43 - XY Profile of Linear Lens Array.

9.40 TracePro 2022 User’s Manual


Anisotropic Surface Property

FIGURE 9.44 - Rotate Selection Dialog

FIGURE 9.45 - Rotation Lens Array

Anisotropic Surface Property


The anisotropic surface property is used like any other surface property, except
that actual values of the property needed for ray-tracing or surface sources are
calculated by bilinear interpolation from the data points you enter. You can apply
an anisotropic surface property to any surface in the model and it will be used in
the usual way.

TracePro 2022 User’s Manual 9.41


Examples

Creating an anisotropic surface property in TracePro


Creating an anisotropic surface property is much like creating a Table surface
property. Select Define|Edit PropertyData|Surface Properties to open the
Surface Property Editor. Select the catalog in which you wish to create the new
property from the Catalog drop-down list. Click the Add Property button, and
select the Scatter Model you wish, and enter Temperature and Wavelength. The
Surface Property Editor will create a new property of type Table. Finally, select
Anisotropic from the Type drop-down list. The figure below shows the editor after
changing to type Anisotropic. This example property was created with ABg scatter
model selected in the Add Property dialog box.

You can add as many Incident Angles and Azimuth Angles as you wish. To add
more angles, click the Add button in the Data Points part of the Surface Property
Editor. The figure below shows the property with three Incident Angles and four
Azimuth Angles. Enter angles in degrees.

Note that for rows in which the Incident Angle is zero, only one of the rows is
editable (the azimuth=0 row) and the others are “grayed out.” This is because the
azimuth angles have no meaning if the light is incident at zero degrees. When you
enter values for the zero incident angle, zero azimuth angle row, the other zero-
incidence rows will update with the same data.

Applying an anisotropic surface property to a surface


To apply an anisotropic surface property to a surface, select the surface(s) to
which you wish to apply the property. Select Define|Apply Properties and click
the Surface tab. Select the property catalog and name from the lists. Next, within
the Surface tab, select the Anisotropic Axis tab and enter the direction for the Zero
Azimuth Direction. Note that this direction vector is also used for orienting the

9.42 TracePro 2022 User’s Manual


Elliptical BSDF

elliptical BSDF, if present. An example is shown below with (1, 0, 0) entered for
the azimuth = 0 axis.

FIGURE 9.46 - Anisotropic Axis Sub-Tab in Apply Properties Dialog

The Zero Azimuth Direction need not lie in the surface, as TracePro will project it
onto the surface. For a curved surface, it will not be possible for it to lie in the
tangent plane of the surface in general anyway. If you are applying the property to
a plane surface, the Zero Azimuth Direction must not be perpendicular to the
surface. Finally, click the Apply button to apply the property to the selection.

Elliptical BSDF
Elliptical BSDF refers to two anisotropic scatter models which may be used in
conjunction with any surface property type. Each model is defined by a major and
minor axis, hence the elliptical name. The data can be defined using ABg or
Gaussian coefficients.
An elliptical BSDF surface property is used like any other surface property, except
that when you apply the property to a surface, you must specify the azimuth=0
axis in the Apply Properties dialog. This is found on the Anisotropic Axis sub-tab
of the surface property tab.

Creating an Elliptical BSDF property


Select Define|Edit PropertyData|Surface Properties to open the Surface
Property Editor. Select the catalog in which you wish to create the new property
from the Catalog drop-down list. Click the Add Property button, and select the
Scatter Model you wish to use, either Elliptical ABg or Elliptical Gaussian, and
enter Temperature and Wavelength. The Surface Property Editor will create a new

TracePro 2022 User’s Manual 9.43


Examples

property of type Table. Finally, select whatever Type of surface property from the
drop-down list. The figure below shows the editor with Elliptical ABg selected and
after changing to type Anisotropic.

Applying an elliptical BSDF surface property to a surface


To apply an elliptical BSDF surface property to a surface, select the surface(s) to
which you wish to apply the property. Select Define|Apply Properties and click
the Surface tab. Select the property catalog and name from the lists. Next, within
the Surface tab, select the Anisotropic Axis tab and enter the direction for the Zero
Azimuth Direction. Note that this direction vector is also used for orienting the
surface property if it is anisotropic. An example is shown in Figure 9.46 with (1, 0,
0) entered for the Zero Azimuth Direction.

9.44 TracePro 2022 User’s Manual


Elliptical BSDF

The azimuth = 0 axis need not lie in the surface tangent plane, as TracePro will
project it onto the surface. For a curved surface, it will not be possible for it to lie in
the tangent plane of the surface in general anyway. If you are applying the
property to a plane surface, the azimuth = 0 direction must not be perpendicular to
the surface. Finally, click the Apply button to apply the property to the selection.

TracePro 2022 User’s Manual 9.45


Examples

Using TracePro Diffraction Gratings


Modeling of diffraction gratings has been added as a new feature to TracePro.
You can model linear gratings using this feature. This means that the grating
grooves are along the intersections of equally spaced parallel planes with a
substrate surface. The substrate surface may be a plane, in which case the
grating grooves are equally spaced and straight. If the substrate is curved, the
grating grooves are defined by the intersection of equally spaced parallel planes
with the substrate.
Gratings of this type are made by a ruling engine, where with each pass the tool is
advanced by the same distance, and the tool is able to follow the contours of the
surface.

Using Diffraction Gratings in TracePro


To use a diffraction grating in TracePro, you must first define a surface property
that is of type grating, specify the diffraction efficiency of each order in the
property, then apply the property to a surface.
To define a grating surface property:
1. First create a new surface property with the ABg scatter model. See “Editing
an Existing Surface Property” on page 3.29.
2. From the Type drop-down list, choose Grating as shown in Figure 9.47.

FIGURE 9.47 - Creating a surface property of type Grating.

3. Add new diffracted orders by clicking Add in the Data Points section.
4. Enter the diffraction order and efficiency for both reflected and transmitted
orders. You can add as many orders as you wish by typing in new orders in the
Add dialog box and clicking Apply after each one as shown in Figure 9.48.

9.46 TracePro 2022 User’s Manual


Using TracePro Diffraction Gratings

FIGURE 9.48 - Adding a grating order using the Add Data dialog box.

The efficiency is the fraction of the incident flux that is diffracted into that order.
TracePro computes the sum of all the reflection efficiencies and puts that value in
the Total row on the on the bottom of the input for the current data subset, and
likewise for the transmission efficiencies. For a Grating surface property, then, you
cannot enter the specular reflectance and transmittance in the usual way. You
may, however, enter the absorptance, BRDF, and BTDF in the usual way, and you
may solve for the absorptance, BRDF, or BTDF. You may also enter as many
angles of incidence as you wish, the same as for a Table type of surface property.
5. Finally, you must enter the grating spacing. This is the distance between the
parallel planes used to form the grating.
The illustration below shows a completed grating surface property with one angle
of incidence and three grating orders. In this example, we defined the BRDF with
A = 0.002, B = 0.001, and g = 2, then solved for Absorptance.

TracePro 2022 User’s Manual 9.47


Examples

FIGURE 9.49 - A completed Grating Surface Property with one angle of


incidence, three grating orders and BRDF.

This surface property is a reflection grating, and we have added a BRDF as well.
When you specify a BRDF, the Integrated BRDF or Total Scatter (TS) will be split
up between the diffracted orders, in proportion to the efficiency.
To apply a grating surface property to a surface, select the surface and select
Define|Apply Properties, Surface tab in the usual way. When you select the
grating property from the Surface Property drop-down list, the Up Direction also
appears.

FIGURE 9.50 - Rectangular substrate with grating formation planes. In this


example, the grating Up Direction could be along the +x or -x axis.

9.48 TracePro 2022 User’s Manual


Using TracePro Diffraction Gratings

The Up Direction is a unit vector that is perpendicular to the grating planes, and
points in the direction of positive diffracted orders. A example is shown in Figure
9.51.

FIGURE 9.51 - Grating Surface Property applied to a plane surface. The Up


Direction is along the +x axis.

Ray-tracing a Grating Surface Property


When a ray intersects a surface with a Grating Surface Property applied,
TracePro will interpolate the efficiency data for the given angle of incidence. If the
direction of incidence is such that one or more orders cannot exist, the flux from
those orders will be given to the remaining orders, in proportion to their
efficiencies. In our example, the grating has reflected orders only, and a BRDF is
defined. In Figure 9.52, the diffracted orders are shown in different views. The
scattered rays have flux below the default flux threshold of 0.05, so they are not
traced.

TracePro 2022 User’s Manual 9.49


Examples

FIGURE 9.52 - Diffracted orders for the example Grating Surface Property.
Scattered rays have flux below the threshold so they are not traced.

If we lower the flux threshold (to 0.001 in this example) we see that the scattered
rays are traced, and there is one scattered ray for each diffracted order as shown
in Figure 9.53.

9.50 TracePro 2022 User’s Manual


Example Using Reverse Ray Tracing

FIGURE 9.53 - The example in Diffracted orders for the example Grating
Surface Property. Scattered rays have flux below the threshold so they
are not traced.6 has been re-run with flux threshold lowered to 0.001 so
that scattered rays are traced.

Example Using Reverse Ray Tracing


In this example we will start with the EllipticalReflector_Reverse.oml model and
use reverse ray tracing.
First, open the EllipticalReflector_Reverse.oml example model. In forward ray
tracing, you would begin a surface source ray trace. Rays would be emitted from
the Arc:Cyl surface, and rays would be collected at the Observation disk:Front
surface (see Figure 9.54). Once the ray trace is completed, you would select the
Observation disk:Front surface and display an Irradiance/Illuminance map
using Analysis|Irradiance/Illuminance Maps. You could also display a
Candela plot using Analysis|Candela plots, sort the rays using Analysis|Ray
Sorting, display an incident ray table using Analysis|Incident Ray Table, or
display ray histories using Analysis|Ray Histories.

TracePro 2022 User’s Manual 9.51


Examples

FIGURE 9.54 - EllipticalReflector_Reverse.oml example model from


www.lambdares.com Technical Support TracePro Examples. In a
forward ray trace, rays are emitted from the Arc:Cyl surface source and
flux collected at the Observation disk:Front surface. In a reverse ray
trace, rays are emitted from the Observation Disk:Front surface and
collected at the source.

In a reverse ray trace you can display all of these analysis results, but in some
cases they have a different meaning. By way of going through this example, we
will see how the meaning is different.
We will do a reverse ray trace in which rays are emitted from the Observation
disk:Front surface. You can choose whatever surface you would like from which
to start the reverse rays. The only requirement is that you first make the surface
an exit surface.

Specifying reverse rays


Using the EllipticalReflector_Reverse.oml model, select the Observation
disk:Front surface and then select Define|Apply Properties to open the
Apply Properties dialog box. Select the Exit Surface tab, check the Exit
surface checkbox, and enter 1000 for the Number of reverse rays, as shown in
Figure 9.55. Click Apply to apply the setting to the surface.

9.52 TracePro 2022 User’s Manual


Example Using Reverse Ray Tracing

FIGURE 9.55 - Apply Properties dialog box showing the exit surface
defined. 1000 reverse rays have been applied to the exit surface.

Setting importance-sampling targets


In order to make reverse ray tracing work, you must define importance-sampling
targets for creating the reverse rays. The rays will be assigned an étendue value
equal as described in the section “Theory of reverse ray tracing” on page 5.37,
with solid angle determined by the importance-sampling target. Without one or
more targets, the étendue cannot be calculated in a meaningful way. The target(s)
are assigned to each exit surface from which reverse rays will be traced. In this
example, we will use one importance sampling target and apply it to the
Observation disk:Front surface. Select this surface and open the Apply
Properties dialog box as in the previous section, but now select the Importance
Sampling tab. We will create an annular importance sampling target at the front of
the reflector, which is located at z = 500, with outer radius = 280 and inner radius
= 20. We will also create cells on the importance-sampling target by dividing it into
radial and azimuthal segments in a 4x4 pattern. Fill in the values shown in Figure
9.56 and click Apply to create the target. With these segments, for every reverse
ray specified, 4x4 = 16 rays will be generated. Because we specified 1000 reverse
rays, 16,000 actual rays will be generated.

TracePro 2022 User’s Manual 9.53


Examples

FIGURE 9.56 - Applying an importance sampling target to the Exit Surface.

Tracing Reverse Rays


Now we are ready to trace reverse rays. Select Raytrace|Reverse Raytrace to
begin the ray trace. Alternatively, you can click the Reverse Trace button on the
toolbar.
Once you start the ray-trace, the Audit progress dialog box will appear, followed
by the Raytrace Progress dialog box, the same as for a forward ray trace. After
the ray trace finishes, you are ready to view analysis results. Figure 9.57 shows
the model window after the ray trace has finished, with rays displayed.

9.54 TracePro 2022 User’s Manual


Example Using Reverse Ray Tracing

FIGURE 9.57 - Completed Reverse Ray-trace with rays displayed.

Viewing Analysis Results


Analysis results can be viewed in much the same way as for a forward ray trace,
but sometimes the meaning is different. The differences and similarities are
described in the sections below.

Irradiance/Illuminance Map
To display an irradiance/illuminance map at an exit surface, first select the exit
surface and then select Analysis|Irradiance/Illuminance Maps, the same as
you would for a forward ray trace. The incident illuminance on the exit surface will
be displayed, the same as if the rays were traced forward. The Irradiance/
Illuminance map for our example is shown in Figure 9.58. Note that about 29,000
rays reached the observation disk. If you do a forward ray trace with 100,000 rays
(this will take much longer than the reverse ray trace), only about 4,000 rays will
reach the observation disk, resulting in a much noiser illuminance map.

TracePro 2022 User’s Manual 9.55


Examples

FIGURE 9.58 - Illuminance map for reverse ray trace.

9.56 TracePro 2022 User’s Manual


Example Using Reverse Ray Tracing

Ray Sorting
To show only the rays that produce irradiance/illuminance at the observation
surface, select the Observation disk:Front surface and select Analysis|Ray
Sorting. From the drop-down list, select Selected Surface as shown in Figure
9.59 and click Update. The only rays displayed are those that would have come
from the source and struck the exit surface in a forward ray trace. The sorted rays
are shown in Figure 9.60.

FIGURE 9.59 - Ray sorting dialog box with Sort Type set to Selected
Surface.

TracePro 2022 User’s Manual 9.57


Examples

FIGURE 9.60 - Sorted ray display with settings as shown in Figure 9.59.

Candela Plot
The only options available for Candela plots are for rays incident on or exiting a
surface, which you control via the Analysis|Candela Options dialog box. This
is because in a reverse ray trace, rays always start from a surface, not from an
infinite distance, as they would have to for a “missed rays” Candela plot. To view a
polar iso-candela plot for rays incident on the Observation disk:Front surface,
simply select the surface, then select Analysis|Candela Plots|Polar Iso-
Candela. The plot should appear as in Figure 9.61.

9.58 TracePro 2022 User’s Manual


Example Using Reverse Ray Tracing

FIGURE 9.61 - Polar iso-candela plot for the Observation disk:Front


surface.

If the plot is blank or does not appear as in Figure 9.61, open the
Analysis|Candela Options dialog box and check that the settings are as shown
in Figure 9.62.

TracePro 2022 User’s Manual 9.59


Examples

FIGURE 9.62 - Candela plot options to produce the plot in Figure 9.61. Note
that the option Use missed rays for Candela Data is not available for a
reverse ray trace.

If you select Use exiting rays from selected surface (Analysis Only) in the Candela
Options dialog box and click Apply, the resulting plot will be blank. This is because
the rays were started in reverse from the selected surface, so there are no rays
exiting the surface in the forward direction.
The other candela plots are also available for a reverse ray trace. Refer to the
TracePro User’s Manual for their use.

9.60 TracePro 2022 User’s Manual


Example Using Reverse Ray Tracing

Incident Ray Table


The Incident Ray Table does not consider the sense of the rays, that is, it reports
rays incident on the surface in the reverse direction. For example, select the
Reflector:Inside surface and then select Analysis|Incident Ray Table. The
table will be displayed as shown in Figure 9.63.

FIGURE 9.63 - Example Incident Ray Table for the Reflector:Inside surface.

Ray History Table


The Ray History Table does not consider the sense of the rays, that is, it reports
rays incident on the surface in the reverse direction. For example, select the
Reflector:Inside surface and then select Analysis|Ray Histories. The table
will be displayed as shown in Figure 9.64, with the history starting from the exit
surface and proceeding to the reflector.

FIGURE 9.64 - Example Ray History Table for the Reflector:Inside surface.

TracePro 2022 User’s Manual 9.61


Examples

Example using multiple exit surfaces


In this example we will start with the EllipticalReflector.oml model and modify it so
that it has multiple exit surfaces. This example will show the true power of reverse
ray tracing. We will first make one small exit surface, apply all needed properties
to it, then perform a Move/Copy to make several exit surfaces. It is important to
apply the properties before doing Move/Copy to avoid having to re-apply the
properties to each new object.
First, open the EllipticalReflector.oml model. Then delete the Observation disk
object. To do this:
1. Select Edit|Select|Object (or click the Select Object toolbar button) to turn
on the object selection tool.
2. Select the Observation disk object as shown in Figure 9.65.
3. Press the Delete key on your keyboard (or select Edit|Cut or type <Ctrl-X>).
The object is now deleted.
Select File|SaveAs and save the model with a new name, e.g.
eliprefl_multiexit.oml.

FIGURE 9.65 - eliprefl.oml file with the Observation disk selected, ready for
deleting.

Now we will make a new smaller exit surface. Select Geometry|Primitive


Solid to open the Insert Primitive Solids dialog box and click the Cylinder/Cone
tab. Enter the data for a cylinder with radius 10, length 10, located at z = 1000 as
shown in Figure 9.66, and click the Insert button to create it.

9.62 TracePro 2022 User’s Manual


Example Using Reverse Ray Tracing

FIGURE 9.66 - Insert Cylinder/Cone with data for smaller exit surface.

Now apply all needed properties to the new cylinder object. These consist of:
1. Naming the object using the system tree. Name it Exit Surface 1.
2. Labeling each of the three surfaces (Edge, Front and Back) in the same way
as the Observation disk surfaces were labeled.
3. Selecting the Front surface and making it an Exit Surface as in Figure 9.68.
4. Setting the number of Reverse Rays on the Front surface as in Figure 9.55 on
page 9.53.
5. Defining an importance sampling target on the Front surface as in Figure 9.56
on page 9.54, except set the number of rings to 1 and the number of slices to
1.
To make an array of exit surfaces, first select the new object and then select
Edit|Object|Move to open the Move dialog box. Enter 40 for the y component of
the Move as shown in Figure 21. Now click the Copy button. This will copy the
object, then move it by 40 in the +y direction. The copy of the object is located at y
= 0, and the original has been moved to y = 40. Click the Copy button six more
times to create eight Exit Surface 1 objects.
Note: By applying all of the properties to the object named Exit Surface 1, each
copy holds the properties so they will not need to be applied to the copies.

TracePro 2022 User’s Manual 9.63


Examples

FIGURE 9.67 - Edit|Object|Move dialog box ready for moving the object by
40 in the y direction.

Open the System Tree and rename the objects so that they are named Exit
Surface 1 through Exit Surface 8. Label the one at y = 0 as Exit Surface 1, the one
at y = 40 as Exit Surface 2, etc. The completed model is shown in Figure 9.68.
Select File|Save to save the model.

FIGURE 9.68 - Completed model with multiple exit surfaces.

Now the model is ready for tracing reverse rays. Select Raytrace|Reverse
Raytrace to begin the ray trace, or simply click the Reverse Trace button on the
toolbar. Once the ray trace is completed, you can select any of the exit surfaces to
see an Irradiance/Illuminance Map, Candela Plot, or any other analysis results as
discussed above. The ray sorting is especially useful for a model like this, as it

9.64 TracePro 2022 User’s Manual


Example Using Luminance/Radiance Maps

allows you to see what paths are taken for each part of the illuminated spot. For
example, select the Exit Surface 4:Front surface, then select Analysis|Ray
Sorting. For the Sort Type, select Selected Surface as shown in Figure 9.59 on
page 9.57, then click Update. The ray display should appear as in Figure 9.69.
You can select each of the exit surfaces in turn and update the ray sorting to see
the paths of rays that hit that surface.

FIGURE 9.69 - Paths of rays that hit Exit Surface 4:Front.

Example Using Luminance/Radiance Maps


Expanding upon the example presented earlier, “Luminance/Radiance Maps” on
page 6.18, it is used here to illustrate the utility of auto importance sampling
toward sources. The OML file can be found by signing in to the Lambda Research
web site and navigating to the TechnicalSupport/TracePro/Examples section. Find
the file:
glass sphere on red-white checkerboard.oml
The tutorial that describes how to use the Radiance/Luminance Map function is
found in the TechnicalSupport/TracePro/Tutorials section:
LuminanceMapExample.pdf
Note that the glass sphere on red-white checkerboard.oml is an exercise left to
the user within the tutorial. This more complex analysis is used in this section to
illustrate the utility to display True Color. Follow the tutorial on how to setup
TracePro for replicating the results displayed here. This example displays a
Luminance Map, but one could do a similar ray trace with a Radiance Map - i.e.,
the two terms can be used interchangeably for the purposes of presentation in this

TracePro 2022 User’s Manual 9.65


Examples

manual. The only difference between the two is that a Radiance Map is displayed
in radiometric units (e.g., W/sr/m2) and a Luminance Map is displayed in
photometric units (e.g., cd/m2 = nit).
Two ray traces have been performed with the selected options as shown in
Figure 5.28 on page 5.40, with the latter having the Auto importance samping box
checked:
• Figure 8: displays the results without auto importance sampling and
• Figure 9: displays the results with auto importance sampling.
In both cases the Color scheme (Analysis|Luminance/Radiance Map
Options…) is set to True Color and False Color Gradient Rainbow.

FIGURE 9.70 - Display map results without auto importance sampling in


True Color and False Color Gradient Rainbow.

9.66 TracePro 2022 User’s Manual


Example Using Photorealistic Rendering

FIGURE 9.71 - Display map results with auto importance sampling.

Example Using Photorealistic Rendering


This example uses the same TracePro model as the previous example, i.e.
glass sphere on red-white checkerboard.oml
which you can download from the TechSupport/TracePro/Examples section of
www.lambdares.com. To create a photorealistic rendering of this model, follow
these steps:
1. Download the file and its associated properties file, and import the properties
using Tools|Database > Import.
2. Open the file and manipulate the view to one similar to that shown in Figure
9.71. Hint: make the window small for a faster rendering, as the render time is
proportional to the number of pixels in the window. Additional hint: Once you
have the view the way you want it, save the view using View|Named Views,
and then save the model. This will make it easier to repeat the rendering in a
future TracePro session by recalling the named view.
3. Select Raytrace|Raytrace Options > Advanced and set Select Mix of
Audit speed vs. Raytrace speed to Fastest Raytrace.
4. Select View|Photorealistic Rendering > Setup and observe the default
settings for rendering, especially the Rendering Quality setting of High.
5. Select View|Photorealistic Rendering > Render to begin the rendering
process. A blank graphics window will open, and the Raytrace Progress
dialog box will appear as TracePro builds the photon map.
6. Next the Rendering Progress dialog box will appear, and the rendering window
will be updated after each rendering pass. Figure 9.72 shows the appearance
of the rendering window after one pass.
7. The completed rendering is shown in Figure 9.73. The scene appears bright
and washed out due to the characteristics of this particular model and how

TracePro 2022 User’s Manual 9.67


Examples

TracePro normalizes the luminance. To improve the appearance, select


Photorealistic Rendering Options and change the Brightness and
Contrast settings to your liking. An example with Brightness set down to 15
and the Contrast left at the default value of 50 is shown in Figure 9.74.

FIGURE 9.72 - Photorealistic rendering result after two rendering passes.

9.68 TracePro 2022 User’s Manual


Example Using Photorealistic Rendering

FIGURE 9.73 - Photorealistic rendering result after three rendering passes


(Quality set to High) with Brightness and Contrast at default values of
0.5.

TracePro 2022 User’s Manual 9.69


Examples

FIGURE 9.74 - Photorealistic rendering result with Brightness adjusted to


0.15.

9.70 TracePro 2022 User’s Manual


and voxel count 5-50
Index speed from voxels 2-55
Auto levels
candela option 6-31
auto-complete in Notepad++ 8-2
automatic
Numerics normal and up vectors 6-44
1D ABg BSDF 7-24
1D Table BSDF 7-25
2D Interactive Optimizer 5-58
B
3D compound background colors 2-58
reflector 2-27 baffle vane 2-33
3D Interactive Optimizer 5-58 attach to tube 2-37
defined 2-33
parameters 2-34
A Beam Setup 5-6, 5-7, 5-15
Biconic 2-15
ABg coefficients 7-17
biconvex lens
absorptance
using Boolean 2-36
and emissivity 4-18
Bidirectional Transmittance Distribution Function 7-16
absorption
birefringent material 4-5
bulk scattering 7-62
Blackbody
surface property 7-15
surface source 4-12
units 3-5
block
absorption coefficient 3-5, 3-8, 7-14
insert 2-3
bulk scattering 7-62, 7-63
Boolean
material property 7-7
defined 2-35
stack 3-44
intersect 2-36
Advanced Selection 1-12
lens element 2-11
All rays one color 6-3
Solid Modeling 2-1
Ambient Luminance 2-66
subtract 2-36
analysis mode
unite 2-37
and simulation mode 5-55
boolean operations 2-35
defined 5-54
lens element 2-11
ray display 6-1
BRDF
saving ray data 5-55
defined 7-16
selecting 5-54
surface property 3-23
analysis options
Brightness 2-67, 6-14, 6-19, 6-25
raytrace 5-42
BRRDF
Anamorphic 2-18
surface property 3-24
Angle convention
BSDF 3-33
candela option 6-33
ABg 7-17
angles measured in substrate 7-48
and bulk scattering 7-61
angular emissivity
elliptical 7-21
surface source 4-17
gaussian 7-24
angular width
Harvey-Shack 7-16
candela option 6-31
importance sampling 7-3
anisotropic
Importance Targets 4-24
defined 7-26
Integral 7-3
anisotropy 3-10, 7-27
Lambertian 7-18
aperture
polished surface 7-5
diffraction 4-32
Pre-defined properties 4-1
entering lens 2-19
shift-invariant 7-16
lens 2-9
surface property 7-15
arrays of objects 2-38
Surface Property Database 3-23
Asphere RepTile 3-71
table 3-33
aspheric
TIS 7-19
Fresnel Lens 2-24
BSDF Converter 3-41
Asymmetric asphere 2-14
BSDF Properties 3-42, 3-47
Asymmetric cone 2-17
BSDF Property Editor 3-48
Asymmetric general asphere 2-15
BTDF
Asymmetric Table BSDF 3-33, 3-39
defined 7-16
Asymmetric Zernike 2-17
surface property 3-23
attenuation index 7-14
Buchdahl
audit 6-65

TracePro 2022 User’s Manual Index-1


GRADIUM 7-12 irradiance option 6-10, 6-23
bulk absorption contours
defined 3-8 candela plots 6-31
flux report 6-63 Contrast 2-67, 6-14, 6-19, 6-25
material property 3-5, 4-4 copy
bulk scattering 3-9, 4-6 rotate 2-41
define new model 7-62 while moving objects 2-38, 2-39
DLL 7-63 while scaling objects 2-42
editing 3-9 CPC
reference 7-61 defined 2-27
simulation 7-62 optimal 2-28
using 2-27
create
C baffle vane 2-33
calculated wavelengths 4-17 blackbody source 4-18
Candela Distributions 6-34 block 2-3
Candela Plot 6-75 boolean 2-35
Candela Plot Viewer 6-75 cone 2-4
candela plots 6-26 cylinder 2-3
and exit surface 4-30 diffracting aperture 9-23
color map 6-31 Fresnel lens 2-22
contour plot 6-31 gradient index property 3-17, 3-20
iso- interpretation 7-90 lens 2-10
normal vector 6-28 material property 3-6
save ray data 5-55 mirror 2-36
simulation 5-56 mueller matrix 4-36
simulation mode 5-56 polarizing element 4-33
smoothing 6-30 reflector 2-24
up vector 6-28 source file 5-22
CEC sphere 2-5
defined 2-27 surface property 3-29
CIE torus 2-5
irradiance map display 6-9, 6-22 tube 2-33
circular grid 5-8 cross grid 5-8, 5-11
class 4-38 crude Monte Carlo 7-1
Coating DLL Directory 2-58 cube-corner
Code V 2-47 RepTile 3-74
coincident surfaces 6-51 curvature
color lens 2-9
apply 4-19 customize
background 2-58 candela options 6-31
object 2-59, 4-19 Cylinder 2-15
property 4-19 cylinder
surface 2-59, 4-19 cone 2-4
Complex Index 7-14 elliptical 2-4
Compound Elliptical Concentrator 2-27 insert 2-3
Compound Parabolic Concentrator 2-27
compound trough
reflector 2-30 D
cone database
elliptical 2-4 bulk scatter 3-9
insert 2-4 gradient index 3-17, 3-20
Conic 2-12 material properties 3-5, 4-4, 4-8
conic 2-10 stacks 3-44
reflector 2-24 surface properties 4-11
conical utilities 6-65
RepTile 3-56 DDE server 8-10
conical angle dialog boxes
baffle vane 2-34 expression evaluator 1-15
Conrady diffraction
interpolation formula 7-7 aperture 4-32
Contour Levels applying 4-33
irradiance option 6-13, 6-24 edge 4-32
contour plot Fraunhofer 9-22

Index-2 TracePro 2022 User’s Manual


raytrace option 5-44 SAT file 2-45
diffraction grating STEP 2-45
example 9-46 surface property 3-30
DIN 5036 4-1 Export Rays 6-61
direction arrows 2-59 Export Reptile 4-43
Direction-Sensitive expression evaluator 1-15
Surface Property 3-28 extinction coefficient 7-14
display eye
Importance Targets 2-55 pan 2-52
RepTile 2-54 set view 2-50
voxel 2-55
display all 2-54
on file open 2-61 F
display object 2-53 F11 3-84
display object WCS 2-54 F12 3-84
dithered grid 5-5, 5-8, 5-10 facet
DLL Fresnel Lens 2-23
bulk scatter 3-12 facetted reflector 2-31
scatter 7-28 file
surface 7-28 text format 2-58
surface property 3-26 File Sources 5-1, 5-22
drawing time Fluorescence 3-12
ray 2-60 Ray Sorting 6-60
DXF Fluorescence Property Generator 3-14
Export Reptile 4-43 Fluorescence Ray Trace 3-15
flux
absorbed 3-8
E bulk scattering 7-61
edge grid raytrace 5-14
diffraction 4-32 importance sampling 7-3
edit report 6-63
lens element 2-11 setting thresholds 5-44
material property 3-7 surface source 4-12
prescription 4-19 Flux-based ray colors 6-2
editor foot-candles
bulk scattering 3-10 irradiance option 6-11
surface property 4-11 Forbes 2-13
ellipsoid formula evaluation
lens surface 2-13 See expression evaluator
RepTile 3-58 Fresnel Coefficients
elliptical calculation 7-26
cone 2-4 surface property 3-26
cylinder 2-4 Fresnel lens 2-22
elliptical BSDF 7-21 aspheric 2-24
example 9-43 equation 2-23
emissivity RepTile 3-49, 4-40
surface source 4-17 RepTile example 9-1
Ensquared Flux 6-15
irradiance 6-15
Euler angles G
defined 2-1 Gamma 2-67, 6-14, 6-19, 6-25
grid raytrace 5-15 gaussian
Eulumdat grid raytrace 5-15
candela option 6-35 gaussian BSDF 7-24
exit surface 4-30 Gegenbauer 3-10, 7-62
reverse ray trace 5-37 glass catalogs 3-5, 4-4
simulation mode 5-54 Gradient Index 3-12
exit surface data 5-48 applying 4-9
simulation mode 5-56 export 3-19, 3-22
export import 3-19, 3-22
gradient index 3-19, 3-22 polynomials 7-9
IGES 2-45 raytrace step size 5-53
material property 3-7 GRADIUM 3-20, 4-9
property data 3-84 polynomials 7-11

TracePro 2022 User’s Manual Index-3


grating importance target
surface property 3-24 display 2-55
Graybody incident flux
surface source 4-12 flux report 6-63
grid boundary 5-5, 5-7 importance sampling 7-3
grid raytrace 5-1 incident ray table 5-23, 6-49
Grid Setup 5-5, 5-15 display format 6-50
Grid Source 5-3 display rays 6-54
GUERAP 7-1 index of refraction 7-6
complex 7-14
material property 3-5
H Insert Lens
Handbook of Optics lens example 9-41
interpolation formula 7-8 Insert Tube
Harvey-Shack Tapered 2-33
BDSF model 7-16 inserting files 2-49
Height interpolation
candela option 6-33 material properties 3-5
Henyey-Greenstein 3-9, 7-61 surface property 3-23
and Gegenbauer 7-62 interpolation formulas
Herzberger material property 7-7
interpolation formula 7-7 intersect
Hidden Line 2-50 Boolean 2-36
hide importance sampling 7-4
object 2-53 Inventor 2-46
hip-roof Irradiance 9-26
RepTile 3-59 surface source 4-12
hyperboloid irradiance
lens surface 2-13 adding maps 6-74
BSDF 7-15
color map 6-12, 6-24
I viewer 6-72
IES/LDT Plots 6-77 irradiance maps
IESNA from saved ray data 6-65
candela option 6-35 options 6-7
IGES 2-46 iso view 2-52
export 2-45 ISO X-Toric 2-16
import 2-45 ISO Y-Toric 2-16
imaginary index 3-8
import
gradient index 3-20, 3-22
K
IGES 2-45 knife edge
lens design 2-47 baffle vane 2-34
material property 3-8
property data 3-83
SAT file 2-45 L
setting model units for geometry 2-61 Lambertian
STEP 2-45 BSDF 7-18
surface property 3-30 lens
import data 2-1 insert 2-10
importance sampling 7-1, 9-26 lens design
add 4-22 Euler angles 2-1
apply 4-20 import 2-1, 2-47
automatically defining 4-26 merging 2-49
bulk scatter 4-7 lens element
bulk scattering 7-62 defined 2-9
detector target 7-6 modify 2-11
diffraction 9-26 using Boolean 2-36
manually defining 4-21 Lighting Efficiency
random rays 7-3 example 6-9
reference 7-2 Lighting Toolkit 6-77
surface source 4-17, 5-22 linear systems theory
surface sources 5-22 BSDF 7-16
when it is used 7-2 lit appearance 2-64

Index-4 TracePro 2022 User’s Manual


Logarithmic Scale
irradiance option 6-11, 6-23
N
Luminance 5-38 naming views 2-52
Display maps 6-18 normal vector
luminous intensity 5-43, 6-26 candela plots 6-26, 6-28
grid raytrace 5-14
irradiance maps 4-31, 6-7, 6-15
M polarization map 6-45
raytrace grid 5-19
macro 8-1, 9-31
Notepad++ 8-2
Macro Recorder 8-2
Notes Editor 2-44
major radius
torus 2-4
material 1-iii
for stacks 3-44
O
selecting in editor 7-7 object
material catalogs 3-5 bulk scattering 7-61, 7-62
material property color 4-19
and bulk scattering 7-62 colors 2-59
appling 4-4 creating arrays 2-38, 2-41
applying birefringent 4-5 material property 7-6
bulk scattering 7-63 move 2-37
editor 3-5 orientation 2-42
export 3-7 rotate 2-37, 2-39
import 3-8 scale 2-37, 2-41
intepolation formulas 7-7 transparency 4-20
new 3-6 zoom 2-51
reference 7-6 Object Selection
Max Photons To Trace 2-66 Advanced 1-12
mean free path 3-10, 7-62 Objects
merging files 2-49 Solid Modelling 2-1
minor radius oblate spheroid
torus 2-4 lens surface 2-13
mirror obstruction
from lens insert 2-9 entering lens 2-20
model lens 2-9
ABg 7-18 Octree voxels 5-51
BSDF 7-16 Odd Cosine 2-18
material property 7-6 oml file 2-1, 6-65
scale 2-62 OPL 6-45
model units OPL/Time-of-flight plot 6-45
defined 2-1 optical path length 6-45
measurement dialog 6-78 optimal
setting default 2-61 importance targets 7-4
model window optimal CPC 2-28
pan 2-52 Optimization 5-1, 5-58
start up size 2-57 orientation
zooming 2-51 candela plots 6-26
Modify irradiance maps 6-7
primitive solid 2-2 raytrace grid 5-19
Monte Carlo 7-1 OSL
analysis 4-20 file extension 2-48
move OSLO 2-47, 4-32
absolute 2-38
copy 2-39
copy example 9-38
P
objects 2-37 package
relative 2-38 dimensions 2-32
source file 5-25 Rim Ray reflector 2-31
zoom 2-51 pan
MOXTEK 3-43 model window 2-52
Mueller matrix 4-33, 5-20 parabolic concentrators 2-27
create 4-33 paraboloid
reference 7-57 lens surface 2-13
table of examples 7-57 parameterization

TracePro 2022 User’s Manual Index-5


RepTile 3-77
Parameterized Reptile
R
Depth 4-42 Radial Spline 2-19
Path Sort Filter Editor 6-5 Radiance 5-38
Path Sort Filter Intercept Types 6-6 Display Maps 6-18
Path Sort Table 5-48 radiance
Path Sort Table Settings 6-4 BSDF 7-15
pause surface source 4-18
raytrace 5-36 Radiant Imaging 5-22
perspective view 2-50 radiometric units
Phase Function 3-10, 7-61, 7-62 option 5-42
photometric units option 5-43 radius
Photorealistic Rendering 2-64, 5-38, 9-67 lens 2-9
Photorealistic Rendering Setup 2-65 random grid 5-3, 5-5
physical memory random rays
raytrace 5-54 importance sampling 7-3
plot option 5-42, 5-44
surface property 3-30 ray
Point Source Transmittance 6-9 direction arrows 2-59
Polar Iso-Candela Plot 6-29, 6-31 drawing time out 2-60
polarization 5-45 file 6-64
enabling 5-45 sorting 6-58
grid raytrace 5-20 ray histories 6-55
maps 6-42 display format 6-57
ray history 6-57 ray node
setup 5-7 incident ray table 6-52
surface property 3-24 ray history 6-57
polarization state 5-7 Ray Sorting
set up 5-20 Fluorescence 6-60
polarizer ray splitting 5-43, 7-1
wire grid 3-43 Ray Trace
Polygon RepTile 3-72 Fluorescence 3-15
position raytrace
object 2-1 grid 5-3
prescription 4-18, 4-26 source 5-22
primitive solid Raytrace Mode 2-63
entering 2-2 Raytrace Options 5-5, 5-41
rubberband 2-8 raytrace report 6-63
primitive solids rectangular concentrator
drawing solids 2-8 reflector 2-31
prism rectangular grid 5-8
RepTile 3-61 Rectangular Iso-Candela 6-26, 6-32
Pro/E 2-46 reflection
profiles surface property 3-23, 7-15
irradiance option 6-11 reflective scattering 7-19
property reflector
color 4-19 3D compound 2-27
report 6-64 compound trough 2-30
property database conic 2-24
import tool 3-83 facetted 2-31
material 3-5 insert 2-24
material format 7-7 package 2-31
material property 7-6 rectangular concentrator 2-31
surface 3-23 trough 2-29
property editors types 2-24
introduction 3-1 relative ground angle
Pyramid Geometry 3-74 baffle vane 2-34
render 2-50
Rendering Quality 2-66
Q report
flux 6-63
Q-type asphere (Qbfs) 2-13
property 6-64
Q-type asphere (Qcon) 2-13
reports 6-63
QWOT 3-45
RepTile
apply 4-40

Index-6 TracePro 2022 User’s Manual


display 2-54 simulating 7-3
texture file format 7-111 simulating bulk 7-62
texture, applying 4-46 surface property 7-15
texture, defining 3-74 scattering direction 7-15
Reptile scattering distribution function 3-9, 7-15, 7-18, 7-61
Depth for Parameterized 4-42 scheme 8-1, 9-31
Export 4-43 scheme editor 8-2
RepTile Surfaces Schott
overview 3-49 interpolation formula 7-7
Reset Defaults 1-11, 2-63 Schott formula 3-6
restore SDF 3-9
ray data from file 5-55 defined 7-61
resume segmentation
raytrace 5-36 importance sampling 4-25
retroreflection select object
surface property 3-24 Advanced 1-12
reverse ray tracing 5-36 select surface
example 9-51 Advanced 1-12
revolve 2-42, 2-43 selecting
example 9-36 simulation options 5-56
surface 2-43 selection
Rim Ray zoom 2-51
reflector 2-31 selection tool 2-38
ring width Sellmeier
Fresnel 2-22 GRADIUM 7-12
rotate interpolation formula 7-7, 7-8
block 2-3 Sellmeier formula 3-6
cone or cylinder 2-4 Sending Scheme commands to TracePro 8-2
copy 2-41 SEQ
copy example 9-38 file extension 2-48
cylinder 2-4 sequence file 2-48
object 2-37, 2-39 Set Defaults 1-11
source file 5-25 set view 2-50
torus 2-5 silhouette 2-50
rotation display accuracy 2-51
merge 2-49 SIM 5-48
object 2-1 Simulation information 5-48
Rotationally symmetric asphere 2-14 simulation mode
rounded prism and exit surface 4-30
RepTile 3-62 defined 5-55
rubberband options 5-56
selection 2-38 ray display 6-1
zoom 2-51 selecting 5-54
Smoothing
candela option 6-30
S smoothing
save candela plots 6-30
ray data 5-55 irradiance option 6-10, 6-11, 6-23
Save Data to Disk 5-48 Solar Emulator 6-77
SAVE-DATA 3-83 Solid Modeling
scale Introduction 2-1
copy 2-42 solid modeling
model 2-62 boolean operations 2-35
object 2-37, 2-41 sorting rays 6-58
scatter DLL 3-12, 7-28 Source
scattering Grid 5-3
and BSDF 7-16 source file 5-22, 5-23
BSDF 7-15 source raytrace 5-22
bulk 7-61 Source-based ray colors 6-3
bulk model 7-61 Sources
defining bulk model 7-62 File 5-1, 5-22, 5-26
Harvey-Shack 7-16 Grid 5-1
in biological tissue 7-61 Surface 5-1
probability function 7-6 Sources Editor 5-34

TracePro 2022 User’s Manual Index-7


specular rays Surface Source Property Generator 3-20
importance sampling 7-2 Surface Sources 5-1
specular reflectance 7-26 sweep 2-42
surface property 3-23 example 9-33
specular transmittance Symmetric cone 2-17
surface property 3-24 Symmetry
sphere candela plots 6-29
insert 2-5 irradiance option 6-11
spherical system tree
RepTile 3-57 for boolean operations 2-36
Stack location 2-60
surface property 3-24
starting ray 5-14
in Analysis Mode 5-54 T
STEP 2-46 table BSDF 3-33
export 2-45 Table BSDF Data 7-98
import 2-45 target
Stokes vector 4-33, 5-7, 5-20, 5-45 number of importance 4-24
defined 5-20 target position 2-50
incident ray table 6-52 pan 2-52
polarization map data 6-45, 6-48 target, importance
polarization option 5-45 add 4-22
ray history 6-57 automatic 4-26
reference 7-57 detector 7-6
table of examples 7-57 target, view
unpolarized 5-21 pan 2-52
stray light 4-21, 6-9, 7-2, 7-3 set view 2-50
diffraction 4-32 temperature
importance targets 7-4 default 4-38
subtract material 3-5
using 2-36 property 4-36
Superconic 2-18 stack 3-44
surface surface property 3-23
color 4-19 temperature distribution
colors 2-59 property 4-53
revolve 2-43 texture
sweep 2-43 applying 4-46
Surface Property defining 3-74
Asymmetric Table BSDF 3-33, 3-39 file format 7-111
direction-sensitive 3-28 Texture Optimizer 5-58
surface property 3-23, 4-11 Texture Optimizer II 5-58
anisotropic example 9-41 thickness
BRRDF 3-24 baffle vane 2-34
create 3-29 bulk absorption 3-8
database 3-23, 4-11 center for lens 2-10
DLL 3-26, 7-28 physical 3-44
editing 3-29 reflector 2-24
import 3-30 stack 3-44
lens 2-20 tube 2-33
name 3-23 Thin Films
plotting 3-30 editing 3-44
reference 7-15 surface property 3-26
RepTile 4-41 thresholds
retroreflector 3-24 setting 5-46
solve for 3-27 setting flux 5-44
stack editor 3-44 TIS 7-19
surface property editor 3-23 Torus 2-15
Surface Selection torus
Advanced 1-12 defined 2-4
surface source insert 2-5
applying 4-12 Torus RepTile 3-70
blackbody 4-18 Total Integrated Scatter 7-18, 7-19
spreadsheet 5-34 TracePro
Surface Source Property 4-12 Overview 1-1

Index-8 TracePro 2022 User’s Manual


tracing a grid of rays 5-3
translation
V
lens data 2-47 variance reduction 7-1
merge 2-49 view
transmission Importance Target 2-55
ray splitting 5-43 naming 2-52
surface property 7-15 RepTile 2-54
transmissive scattering 7-1, 7-19 voxel 2-55
transparency Volume Flux Viewer 6-68
object 4-20 voxel 5-50
trough display 2-55
reflector 2-29
True color options 6-14, 6-19, 6-25
Tube
W
Tapered 2-33 Wavelength-based ray colors 6-3
tube wavelengths
insert 2-33 material properties 3-5
material property 7-7
surface properties 3-23
U wheel mouse
uniform zoom 2-51
grid raytrace 5-14, 5-15 Width
source 4-17 candela option 6-33
units wire grid polarizers 3-43
absorption 3-5 wireframe 2-50
absorption coefficient 3-8, 7-7 Working Coordinate System
BSDF 7-16 defined 2-1
candela 6-26
default rotation 2-39
model 2-38
X
photometric option 5-43 XY view 2-52
radiance 7-16 XZ view 2-52
radiometric option 5-42
scattering distribution function 7-61
setting model units 2-62 Y
temperature 4-38 YZ view 2-52
up vector
candela plots 6-26, 6-28
grid raytrace 5-14 Z
irradiance maps 4-31, 6-7, 6-15 ZEMAX 2-47
polarization map 6-45 ZMX
raytrace grid 5-19 file extension 2-48
set view 2-50 zoom
Update Property Database 3-83 preferences 2-61
User DLL 3-11

TracePro 2022 User’s Manual Index-9

You might also like