Skip to content

How many rays should I trace?

Question

How many rays should I trace?

Synopsis

How many rays should I trace?

Solution

There is no general answer to how many rays should be traced, but there is a useful feature for assessing the uncertainty. Please select Raytrace/Raytrace Options, and note that there is a Random Seed setting, usually set to the default value of 1.

There are numerous calculations performed in a TracePro ray trace and many of them, like the direction of a scatter ray or the position on a surface that a ray is emitted from a Surface Source, involve the use of a Random Number Generator algorithm within TracePro.

If TracePro simply used the Random Number Generator alone, then you could click Trace Rays in TracePro, view the analysis results, then click Trace rays again and get a completely different set of rays to trace. If enough rays are traced, all ray traces would converge to a single analysis result.

The Random Seed feature of TracePro is what allows you to trace rays, today, next week, and next month, and get the exact same set of rays to trace. This seed is used to start the Random Number Generator in the same place each time.

This is a useful behavior, but it can also lead to a false sense of security that the analysis result is absolutely correct.

By performing additional ray traces with the Random Seed set to 2, 3, 4, ... 100000, you can assess if the variation in these ray sets is beyond the comfort zone of your analysis. If so, the resolution is to trace more rays.