algorithmic modeling for Rhino
Where is the description of Rhino.Render.Sun.SunDirection?
I have written the very simple following script
private void RunScript(DateTime x, object y, ref object A, ref object B, ref object C, ref object D, ref object E)
{
Rhino.Render.Sun theSun = Rhino.RhinoDoc.ActiveDoc.Lights.Sun;
DateTime dt = theSun.GetDateTime(DateTimeKind.Local);
A = dt;
theSun.SetPosition(dt, theSun.Latitude, theSun.Longitude);
Vector3d fVec = new Vector3d(theSun.Vector);
Vector3d sVec = Rhino.Render.Sun.SunDirection(theSun.Latitude, theSun.Longitude, dt);
D = fVec - sVec;
B = fVec;
C = sVec;
E = "Latitude " + theSun.Latitude.ToString() + " - Longitude " + theSun.Longitude.ToString();
}
and B and C are never the same. I do not understand why. Can someone explains how SunDirection works or what is the best way to have the vector to the sun ?
Thanks
Serge
Tags:
Is it from my computer and SunDirection & Sun.Vector are working fine for everybody else or nobody knows the answer?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by