Lee Ludd
Scripted doors & windows
Join date: 16 May 2005
Posts: 243
|
06-27-2005 16:37
According to the LSL Wiki, the function llGetSunDirection "returns a normalized vector that points toward the current location of the sun". This means this vector sits on the surface of a unit sphere, but where is the center of this sphere? Nowhere can I find this documented.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-27-2005 16:42
... the center of a unit sphere is <0,0,0>.
If you are asking what point the sun orbits around that shouldn't be too hard to calculate from observations. It should be noted that the orbit wobbles.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
06-27-2005 17:38
Well, you'll find the center point to not be a point at all, but a block that covers the entire map. Run llGetSunDirection() at all four corners of the world... you'll find that it returns the same direction (if triggered at exactly the same instant.) Have the scripts IM the results every hour maybe.
Astronomically, I belive this means that either we're a really tiny world, or that the sun is so massive and distant, that our float magnitude limit doesn't reveal the slightly offset angles.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-27-2005 18:59
Actualy in this case the world is flat and the sun is at an infinite distance and infinite scale.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Lee Ludd
Scripted doors & windows
Join date: 16 May 2005
Posts: 243
|
06-27-2005 20:21
I appreciate your responses, although they do not answer my question. Let me ask another one. The function llGetSunDirection returns a vector. Let us call the components of this vector x, y and z. Now z, apparently, is the angle, in radians, measured upwards from the horizon, of the sun at the time the measurement was take. This is what I believe the astronomers call the altitude. Now, what are x and y?
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
06-27-2005 20:47
Nup. The vector is really a point in space - though the coordinates are not relative to the sim or the object with the script calling the function. You can figure the angle by drawing a line from <0,0,0> to the coordinate. That's why you can point an object at the sun by having it point at llGetPos() + llGetSunDirection(). Or, at least, that's how I understand it.
|
Lee Ludd
Scripted doors & windows
Join date: 16 May 2005
Posts: 243
|
06-28-2005 06:41
I want to thank everyone who replied to this thread. Thanks to you, I finally figured it out. I now have an arrow that points to the sun, updated every minute, at Grass (20,194) until I move it or remove it.
|