POV-Ray : Newsgroups : povray.documentation.inbuilt : 3.7.20.6 sunpos.inc : 3.7.20.6 sunpos.inc Server Time
24 Apr 2024 07:05:01 EDT (-0400)
  3.7.20.6 sunpos.inc  
From: Russell Towle
Date: 27 Nov 2007 20:50:01
Message: <web.474cc80d3c745ea32c17e1db0@news.povray.org>
Hi,

I believe there is an error in the documentation of sunpos.inc, at 3.7.20.6
sunpos.inc.

The example given reads

//begin example
#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 {...}
   }
//end example

However, if one experiments with changing the time of day, one will see that the
cylinder does not align to the sun's direction. Changing to

cylinder{
      <-2,0,0>,<2,0,0>,0.1
      rotate <0, 0, Al>
      rotate <0, Az-90, 0>
   }

fixes the problem.

It may help to use a plane at y=0 and a camera with y=up, a little above the
plane, to see the cylinder's orientation.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.