|
|
Am Sun, 12 Apr 2009 16:12:33 +0200 schrieb Jörg 'Yadgar' Bleimann:
>
> I programmed several camera modes, one of them with the camera pointing
> towards a customizable location stated in geographical coordinates on
> Earth. As long I left my Earth sphere standing upright in space, this
> works fine - but how do I correct the camera's orientation for Earth's
> axial tilt (rotate <23.4333, 0, 0>?
>
> I quickly understood that the tilt angle multiplied with the sine of the
> longitude (with western longitudes being positive, eastern ones
> negative) had to be added to/subtracted from the original latitude - but
> how is the longitude adjusted afterwards?
>
Why not do these calculations in cartesian coordinate space? I suppose
you already have a way of converting a point from earth's local
geographical coordinate system to earth's local cartesian coordinate
system. All you have to do with the resulting vector is to rotate it
around earths axis of tilt using vrotate(). Then translate and rotate it
according to earth's position in the solar system and you should arrive
at the point's world coordinates.
Post a reply to this message
|
|