7.21.6  sunpos.inc

This file only contains the sunpos() macro

sunpos(Year, Month, Day, Hour, Minute, Lstm, LAT, LONG). The macro returns the position of the sun, for a given date, time, and location on earth. The suns position is also globally declared as the vector SolarPosition. Two other declared vectors are the Az (Azimuth) and Al (Altitude), these can be usefull for aligning an object (media container) with the sunlight.
Assumption: in the scene north is in the +Z direction, south is -Z.
Parameters:

Use :

   #include "sunpos.inc"

   light_source {
      //Greenwich, noon on the longest day of 2000
      SunPos(2000, 6, 21, 12, 2, 0, 51.4667, 0.00) 
      rgb 1
   }

   cylinder{
      <-2,0,0>,<2,0,0>,0.1
      rotate <0, Az-90, Al>  //align cylinder with sun
      texture {...}
   }