Lambda TracePro 2022 User Manual
Lambda TracePro 2022 User Manual
User’s Manual
Release 2022
Revised 7-July-2022
[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
TraceProand 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.
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.
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 Expert
TracePro Standard
TracePro LC
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 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
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.
Toolbars
System
Tree
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.
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.
Note: Press the Key first, then the Mouse button. You will see the appropriate
toolbar item activate.
A B C D
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.
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
surface in the Model Window, you can see the selection as highlighted in the
System Tree.
FIGURE 1.10 - System tree menus for Object and Surface Selection.
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.
• 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.
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.
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.
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.
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
(=). 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.
For a complete list of valid input for expression see Table 1.1
.
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
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.
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.
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.
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.
Block
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
To create a Cylinder:
1. Select the Cylinder/Cone tab of the Insert Primitive Solids dialog box.
2. Select the Cylinder radio button.
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.
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
To create a sphere:
1. Select the Sphere tab of the Geometry|Primitive Solids dialog box.
2. Enter the radius of the sphere.
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
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.
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
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.
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.
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.
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.
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
• 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.
Conic
The conic surface is a conic section curve revolved to make a surface, and has
the sag
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
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:
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:
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
where
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
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.
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θ
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
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
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
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;
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
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.
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
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
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
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.
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
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:
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
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.
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).
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.
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)
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.
.
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
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)
.
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.
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.
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.
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.
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.
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.
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.
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.
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-
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.
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.
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.
Plane of Surface
Axis of rotation
Radius
Angle
To revolve a surface:
1. Select a planar surface
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, .
Bold Text
Italicize Text
Underline Text
Strikeout Text
Bullet Text
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
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.
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
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.
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.
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.
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.
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
available for future recall. The new views are added to the listing in the dialog and
are saved in the model's OML file.
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.
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.
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.
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.
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.
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
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.
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.
IT
X Z
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.
General
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.
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
Enable Spaceball
Support for Spaceball input devices is available. Do not enable the Spaceball
mode without the proper device drivers.
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.
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.
FIGURE 2.37 - Options dialog window with the Ray Display pane chosen.
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.
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.
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.
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.
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.
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.
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:
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.
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.
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.
Collapsed Columns
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.
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.
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.
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.
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.
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
N = n + ik (3.3)
k and are related via the following:
4k
= --------- . (3.4)
When converting k to and from , you must be careful to use in millimeters.
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.
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.
2
1–g
SDF = p = ------------------------------------------------------------- (3.5)
2 32
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
Px = 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.
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)
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.
The relative absorption, relative excitation, and relative emission values are
normalized.
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.
Create Model
Perform Analyses
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.
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.
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.
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).
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.
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.
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.
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.
• 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.
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.
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.
‘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.
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
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.
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.
To modify the display parameters or materials used in the calculation, select the
Plot Options button to modify the plot parameters.
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].
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.
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.
FIGURE 3.16 - Selecting Table BSDF from the Scatter Model list in the Enter
New Surface Property dialog box.
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.
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.
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.
FIGURE 3.19 - Table type surface property with Table BSDF model after
importing into Excel.
FIGURE 3.20 - Surface property after filling in example values for |-0| and
BRDF.
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.
FIGURE 3.23 - Selecting Asymmetric Table BSDF from the Scatter Model list
in the Enter New Surface Property dialog box.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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
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.
TABLE 3.13 - Compatibility of geometry and tile shapes and also factors
that define the shape and placement of the "bump"/hole.
Tile shape
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
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
Block X X X X X C,V,P C
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
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.
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.
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.
Chamfer height
Cone depth/height
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
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
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
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.
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.
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.
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
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.
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.
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.
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.
depth/height, cone angle, peak radius, and trough radius. For parameterized
geometry, you can also enter decenter in x and y.
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.
The block is rotated about its center point, about the X, Y and Z axes in turn.
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 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.
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.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.
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.
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.
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
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.
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.
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.
• 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.
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
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:
Ring
iRing = ring number (counting from the center outward)
jAzi = azimuth angle (in degrees, clockwise from the +x axis)
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.
Parameter Expressions
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.
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.
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.
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”).
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
Material Properties
Use the Material Property to specify the index of refraction and the bulk
absorption of an object.
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.
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.
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).
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.
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.
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.
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.
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
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.
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)
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.
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.
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.
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.
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.
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 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)
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.
FIGURE 4.14 - The Apply Properties dialog box - Importance Sampling data
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.)
sampling target for the diffracting aperture is applied to the surface that is defining
the edge of the aperture.
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.
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.
1 0 0 0
0 1 0 0 ,
0 0 1 0
0 0 0 1
while a horizontal polarizer is represented by
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.
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.
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.
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.
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.
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.
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.
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.
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.
Top tangent
Truncated to surface
Immersed
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
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.
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.
Rays
A B C
Object with Object with Grid raytrace on
real features RepTile property RepTile surface
Surface Property
applied here
Surface
surrounding
RepTile
Surface Property
applied here
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.
• 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.
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.
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:
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.
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.
FIGURE 5.3 - From the Define menu, the Grid Source dialog box
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
Table 5.2 lists the Beam options of a Grid Source. The Beam options alter the
spatial and angular profiles of the grid.
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
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.
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.
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
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)
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.
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.
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.
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
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.
The output from the above ray grid is shown as an irradiance plot in Figure 5.10.
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.
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.
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.
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.
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.
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.
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)
This is the radius to the 1/e2 value of the beam along the grid y-axis,
2
–2 y y0
E = E peak e , (5.4)
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).
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
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.
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.
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
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 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
• 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.
Custom Polarization
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
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.
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:
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.
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:
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.
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
• 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.
FIGURE 5.16 - Color test image inserted into a TracePro model and
displayed on the resulting thin sheet
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).
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
• 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).
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.
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.
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.
The source Type, Units, and Distribution are altered using a drop down list by
pressing the list arrow as shown in Figure 5.26.
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.
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.
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, ds 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
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.
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.
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.
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.
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
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
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.
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.
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
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
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)).
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.
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
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.
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
box. To save ray data for candela/intensity plots, check the Collect Missed Rays
Candela Data checkbox.
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.
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
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.
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.
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.
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
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.
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
able to examine the irradiance at any surface. You will also be able to display
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.
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.
When data is being saved to SIM files, an entry for Notes is provided. See “Index
file name” on page 5.48
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.
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.
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.
The Collect Exit Surface Data and Collect Missed Rays Candela Data options are
found on the Options tab in TracePro LC.
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.
CHAPTER 6 Analysis
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.
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.
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.
Miss
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.
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,
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.
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 22
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,
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.
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.
• 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.
FIGURE 6.6 - Irradiance Map with Profiles for Elliptical Reflector Demo
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.
Number
If the Contour Plot box is checked, this controls the number of contour levels that
are displayed in the contour plot.
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.
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.
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
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.
The flux and area are displayed in the status bar of the main TracePro window.
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.
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
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
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
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.
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.
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.
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
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
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.
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.
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.
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.”
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.
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.
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
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.
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,
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.
TracePro Release: [major release no] [minor release no] [dot release no]
Polar Iso-Candela Data for [path and file name of TracePro file]
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
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),
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.
FIGURE 6.22 - Candela Options dialog with the Rectangular Iso-Candela tab
displayed.
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.
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.
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.
0°
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
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.
FIGURE 6.26 - The additional IES File Auxiliary Data dialog for the IESNA
format allows you to enter a number of IESNA-specific parameters.
• 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):
• 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.
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.
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
The flux and area are displayed in the status bar of the main TracePro window.
FIGURE 6.30 - Select Rays Dialogs for Polar (L) and Rectangular (R) Iso-
Candela Plots.
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.
Polarization Options
The following options are available for the polarization plots and accessed from
the dialog shown in Figure 6.32.
Rays to Plot
You can observe a map of either absorbed or incident rays.
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.
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.
(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.
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
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
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
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.
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.
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
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
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.
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.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.
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
ray (<), next ray (>), or last ray (>|). You can also insert the ray number and press
the Enter key to display a specific ray.
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.
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
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.
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.
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.
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.
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
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
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.
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.
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.
Raytrace Report
This report displays a modal dialog with the elapsed raytrace time for the most
recent raytrace of the active model.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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
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
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.:
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.
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.
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.
random rays
specular rays
importance rays
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.
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)
Housing/Mount
L1 L2 Detector
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:
– 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.
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.
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:
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
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
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
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
n0
n r = --------------------------2-
1 + ---------
r
nr1
2 2 2 2
where… r = x + y + z – sgc
2
n r = n 2 – ---------
r
nr1
2 2 2 2
where… r = x + y + z – sgc
GRADIUM gradient
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
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
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 .
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
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
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 - sin0|, 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 - sin0|, sin - sin0, sin, or as the
horizontal axis.
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.
A typical ABg model BSDF, graphed on a log-log scale, is shown in Figure 7.5.
1E3
Power law
1E2 BSDF
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
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)
2 2
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
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.
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.
FIGURE 7.7 - Scattering geometry with the Use fixed axis for zero-azimuth
for asymmetric scatter option unchecked.
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
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.
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
------- = ------------------
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
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
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.
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
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
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.
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.
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.
Overview
TracePro Expert provides interfaces for user defined properties using dynamic
link libraries (DLLs). Currently Surface and Bulk Scatter properties are available.
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.
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]
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
• \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.
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.
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.
DLL writers should use the definitions provided herein and not hard code numbers
when their usage is warranted.
Double:
• OK and no message to be output by TracePro:
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.
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.
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 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]
1. By assigning as follows:
results[SIGNAL_TO_TRACEPRO] = COATING_DLL_SIGNAL_NONE;
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
3. By assigning as follows:
results[SIGNAL_TO_TRACEPRO] =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.
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
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,
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(
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]
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
);
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
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.
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;
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
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
)
{
double result_val = 0;
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;
return result_val;
}
////////////////////////////////////
// End of example
////////////////////////////////////
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
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 .
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.
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
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.
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.
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.
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
-
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.
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.
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 = sin2x
+ sin2y. 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
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.
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.
2
1–g
SDF = p = ----------------------------------------------------------
32
-, (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.
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.
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.
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).
material property with the proper bulk absorption coefficient and apply it to your
scattering object.
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
fnMeanFreePath
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).
if ( coef == NULL )
return (double) result;
double g = coef[2];
double g2 = g * g;
double cos_temp;
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;
coef[14] = Coeff 4
coef[15] = Coeff 5 and so on.
EXPORTS
fnInitDll @2
fnMeanFreePath@3
fnEvaluateBSDF@4
fnScatterDirection@5
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
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 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.
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.
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.
<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
b0b20
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
.
.
.
.
. . . .
T(x1, y2) T(x2, y2) T(x3, y2) T(xn, y2)
y axis
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
Temperatures [Kelvin]
T(X1,Y1)
T(X2,Y1)
T(X3,Y1)
.
.
.
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)
Coefficients
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
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
Temperatures [Kelvin]
T(R1,q1)
T(R2,q1)
T(R3,q1)
.
.
.
T(Rn,q1)
T(R1,q2)
T(R2,q2)
T(R3,q2)
.
.
.
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)
Coefficients
b0
b1
b2
b3
b4
b5
b6
b7
b8
b9
b10
b11
b12
b13
b14
b15
b16
b17
b18
b19
b20
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
Temperatures [Kelvin]
T(Z1,q1)
T(Z2,q1)
T(Z3,q1)
.
.
.
T(Zn,q1)
T(Z1,q2)
T(Z2,q2)
T(Z3,q2)
.
.
.
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)
Coefficients
c0,0
c1,0
c2,0
.
.
.
c5,0
c0,1
c1,1
c2,1
.
.
.
c5,1
c0,2
.
.
.
c5,9
c0,10
c1,10
.
.
.
c4,10
c5,10
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
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 )]
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
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
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
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
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.
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).
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
Read for
Line # Description Import Format
1 File Header Yes TracePro Stack Property Data
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
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
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
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)
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 Features
<Type1><BumpSign1><Param11><Param12><Param13>…<Param1M>
.
.
.
<TypeN><BumpSignN><ParamN1><ParamN2><ParamN3>…<ParamNM>
Line
# Parameter Description Format
1 File Header RepTile Texture File String
TABLE 7.19. Textured RepTile file parameter values for each geometry type.
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
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.
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:
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.
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.
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.
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.
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.
author has also generously arranged for the entire text to be available online at
http://www.scheme.com/tspl4/
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<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
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();
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.
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.
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 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.
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
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.
strApp = "TracePro"
strTopic = "scheme"
Application.DDETerminate channelNumber
End Sub
CHAPTER 9 Examples
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
.
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
facet will still have a base thickness of almost 1.5 mm (substrate thickness –
tallest facet height = base thickness).
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.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
FIGURE 9.5 - The Fresnel Lens Example RepTile property exported text file
after opening in Excel.
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.
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
.
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.
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.
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.
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.
9. Enter the geometry values above into the appropriate columns in the table.
The entries should appear as in Figure 9.14.
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.
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.
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.
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.
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.
FIGURE 9.19 - Insert a block and apply the Conical Hole Example RepTile
property to it.
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.
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.
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.
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.
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.
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.
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.
FIGURE 9.24 - The Model Window Display at the Current Step of the
Example
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.
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.
You can see in Figure 9.25 how the incident rays are most highly concentrated in
the center of the map.
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
of this raytrace:
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.
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.
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)
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.
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
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
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:
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
angles as it is swept along the path; otherwise, it is contracted for positive angles,
and expanded for negative angles.
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.
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
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.
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.
elliptical BSDF, if present. An example is shown below with (1, 0, 0) entered for
the azimuth = 0 axis.
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.
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.
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.
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.
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.
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.
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.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.
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.
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.
FIGURE 9.55 - Apply Properties dialog box showing the exit surface
defined. 1000 reverse rays have been applied to the exit surface.
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.
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.
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.
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.
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.
FIGURE 9.63 - Example Incident Ray Table for the Reflector:Inside surface.
FIGURE 9.64 - Example Ray History Table for the Reflector:Inside surface.
FIGURE 9.65 - eliprefl.oml file with the Observation disk selected, ready for
deleting.
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.
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.
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
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.
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.