chbergmann / OpticsWorkbench

GNU Lesser General Public License v3.0
69 stars 23 forks source link

added automatic adjustment of scene size #16

Closed wohltat closed 2 years ago

wohltat commented 2 years ago

Hi, this is more of an experimental branch. This is to show what i meant in #4 with an automatic adaptation of the ray length.

It seems to work but probably you don't want to use it as it is. I just changed one makeLine. But i don't understand why there are multiple places with makeLine in traceRay and redrawRay

lgtm-com[bot] commented 2 years ago

This pull request introduces 1 alert when merging 2f63788b4b41db188dcaa48a4591ff6909443baa into 0e9012fb77245e0891d86342beb6b46011041957 - view on LGTM.com

new alerts:

chbergmann commented 2 years ago

redrawRay() draws the first ray, or multiple first rays if it is a beam. traceRay() takes the last ray and does the raytracing. It will call itself recursely for the last newly created ray

chbergmann commented 2 years ago

As I already mentioned I am happy with MaxRayLength = 1000000. But of course we can keep this as an option

luzpaz commented 2 years ago

What's the verdict on this?

chbergmann commented 2 years ago

I do not want to merge this pull request. Adapting the ray length automatically to the size of the scene would confuse the users. We have the possibility to place an absorber box around our scene to set a limit.