POV-Ray : Newsgroups : povray.documentation.inbuilt : 3.7.20.6 sunpos.inc : Re: 3.7.20.6 sunpos.inc Server Time
25 Apr 2024 15:17:41 EDT (-0400)
  Re: 3.7.20.6 sunpos.inc  
From: SharkD
Date: 17 Jan 2008 17:05:00
Message: <web.478fd018734cd6ed7ba03b340@news.povray.org>
"Russell Towle" <rto### [at] inreachcom> wrote:
> 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.

I believe (untested) that changing it to this will also work:

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


Post a reply to this message

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