Matching issue calculation Altitude/Azimuth compared to Sunpath Ladybug

Hi, When I calculate the sun position by an altitude and azimuth angle rather than by HOY’s (hour day and month) as with LadyBug’s Sunpath, the results don’t match.

I’m pretty sure my script is correct (with Azimuth north-based azimuths going clockwise from North=0° to East=90°). Any suggestions what is happening. My location intended location is northern hemisphere (Amsterdam) and I want the positive Y-axis to be North.


download GH file

Hi @crz_06, welcome to the forum!

The vector you’ve calculated is the negative of what LB is generating. The LB vector I would say is the correct result, as the z is negative - ie the sun is shining down from above.

The reason you’re getting the opposite is that grasshopper rotation follows the “right hand rule”, ie rotation is counter clockwise not clockwise.

Right-hand rule - Wikipedia

image

1 Like