danieljfarrell / pvtrace

Optical ray tracing for luminescent materials and spectral converter photovoltaic devices
Other
97 stars 94 forks source link

TIR optimisation when tracing box geometry #16

Open danieljfarrell opened 5 years ago

danieljfarrell commented 5 years ago

TIR rays inside box geometry have an analytically calculable total path length to edge.

This issues proposes adding a special optimisation for Box geometry which can speed to tracing of TIR rays. Rather than calculating a single reflection segment at a time, the total path length should be calculated and the ray should either be moved to the edge or moved to absorption location.

The details of how this is implemented need to be fleshed out. For example, should the ray still emit reflection events that it would have emitted if tracing each segment?