Notifications
Clear all

[Closed] Getting Cartesian coordinates from Daylight System Lat Long

 em3

s=sphere radius:100
dePlane = plane pos:s.pos
dc =  $daylight001.controller
long = dc.longitude
lat = dc.latitude
r = s.radius
x = r*(cos(long))*(sin(lat))
y = r*(sin(long))*(sin(lat))
z = r*(cos(lat))
p=point pos:[x,y,z]
	
vec = normalize(dePlane.pos - p.pos)
drawlinebetweentwopoints dePlane.pos p.pos

Hi! This is step 1 in trying to get the declination angle of the sun to an object at a certain lat/long. This is in an attempt to validate the data being returned by the 3DS Max daylight system against one of my coworkers spreadsheet.

Will this return an accurate angle?
Is there a better way?

Thanks!