I was working on a script to orient spotlights to a certain focus point. This requires the fixture to be rotated in 2 planes. The rotation angle I calculate by creating vectors between the light fixture and the focus point. See attached rhino file and python script.
Right now it works, but only trough iteration in ugly while loops. I want to know if there is a way I can determine the direction I need to rotate in.
This script is a continuation of a version posted here
spotlight_focus.3dm (496.8 KB)
spotFocusAdvanced-v03.py (3.8 KB)
edit: removed the while loops, now using singed angles to calculate the right rotations:
spotFocusAdvanced-v04.py (4.1 KB)