[gameprogrammer] Re: calculating sun/moon position according to time

  • From: Roger Durañona Vargas <luo_hei@xxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Fri, 15 Jul 2011 12:12:44 -0400

On 15/07/11 11:29, Charlie Lobo wrote:
Hmm, well if you want the position of the sun in the sky (in radians)
you'd do something like:
time(in miliseconds) * 2*PI / 86400000
Of course this doesn't matter when the sun is hidden
If you want more elaborate sun movement, you have to consider that the
sun's path "wobbles" from north to south as the year goes by due to the
inclination of the planet's rotatoinal axis. It's also shifted north or
southwards depending on the latitude.
Well, I just need a basic path east/west, and also limit de arc to a sky section to avoid the light reaching horizont level, that could cause objects to cast near-infinite shadows, which are a big mess in Ogre.


--
Roger D. Vargas
Using Gentoo Linux 2010
La unica forma de encontrar los limites de lo posible es yendo mas
alla de ellos, hacia lo imposible

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: