Method to build a backward raytracing in GH?

Dear GH community,

I have a little tricky question.

I would like to find a method to follow the so-called Backward-Raytracing and see if is possible that a specular reflection exists between the line of sight AB and the sun position C, knowing the vector direction from point B to use for the reflection. I also have the information of the point C and the vector between B and C.

Any advice on how to solve this problem?

Thanks in advice
Jrob

UPDATE: If I understand your problem correctly here is a script that I think tackles it?

The viewer at the green dot is good to go, the red dot viewer is seeing the sun on the glass, OUCH! :sunglasses:

You can adjust the tolerance in the “Tolerance In Degrees (Viewing Cone)” Panel.

Method Utilizing Geometry:
backward_ray_trace_01b.gh (14.7 KB)

Method Utilizing Vector Math Only:
backward_ray_trace_01c.gh (15.3 KB)



2 Likes

Dear Michael,
I sincerely thank you for your time and expertise. The script is really clean and clear.
After a quick check, everything seems ok and with what was my goal.

I just have to understand what degree of tolerance is more appropriate to use.

Thanks for all and best regards.

J-Rob

1 Like

Glad to hear that J-Rob, all the best and let me know if you get stuck implementing it.

Cheers!