- Home
- Non Sequential Ray Tracing
- Error Messages
- What Does "Not Enough Segments Allocated to Trace All Possible Ray Paths" Mean?
- Home
- Frequently Asked Questions
- What Does "Not Enough Segments Allocated to Trace All Possible Ray Paths" Mean?
What Does "Not Enough Segments Allocated to Trace All Possible Ray Paths" Mean?
- By Dan Hill
- Published 1 September 2006
- Error Messages , Frequently Asked Questions
-
Rating:




Maximum Number of Intersections and Segments Per Ray - The Non-Sequential Tab
So where do we change the parameters which control the number of intersections and segments which can be used in the ray trace? Along with a number of other parameters, these two user-defined values can be modified under the Non-Sequential tab of the System > General dialog:
Every control within this dialog defines how rays are traced within an NSC group in ZEMAX. For details on any specific control, you may refer to the following section of the ZEMAX User’s Guide: “System Menu chapter > General > Non-Sequential.”
The maximum number of segments and intersections are used to set the maximum number of allotted segments or intersections per ray launched. This means that each ray launched from a source can have up to the maximum number of segments and intersections defined. So, if the maximum number of segments is 1,000, and 5,000 individual rays are launched, ZEMAX can store up to 5 million ray segments.
So why does ZEMAX allow these parameters to be user-defineable? Why doesn’t ZEMAX just trace as many segments as is needed to complete the trace? The reason for this is that ZEMAX would have to reserve a lot of memory to potentially support a huge number of segments. In most cases, this isn’t necessary, and would slow down the ray trace.
The total RAM requirement is about 140 bytes multiplied by the maximum number of segments. Setting the limit at 100,000 segments would require 14Mb of RAM per ray. For this reason, do not needlessly set the maximum to very large number! The limit that ZEMAX will allow is 2 million ray segments.
Note that with even a modest number of segments, ZEMAX can still trace millions of rays. The maximum number of segments is only a limit on how many segments are allows in one single ray. Most ZEMAX features only use one ray at a time, so the total RAM requirement is driven by the maximum number of segments rather than the number of rays traced.