POV-Ray : Newsgroups : povray.general : sunpos.inc error : sunpos.inc error Server Time
31 Jul 2024 04:17:31 EDT (-0400)
  sunpos.inc error  
From: Russell Towle
Date: 14 Nov 2007 10:50:00
Message: <web.473b17ecad42e70858d2d5d80@news.povray.org>
I have used three different sun position methods in POV, and was pleased to find
that "sunpos.inc" was bundled with recent releases of POV. However, until today
I could never get it working properly.

Part of my problem arose from an error in the official documentation of this
macro, at

http://www.povray.org/documentation/view/3.6.1/498/

Here, a cylinder is (supposedly) aligned with the sun-vector, at noon (actually,
two minutes past noon) on June 21, 2000, Greenwich, England. The error occurs
because the cylinder
is improperly rotated. The documentation gives

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

but for the cylinder to align properly, one must use, instead,

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

Thus, the problem seems to be the old non-commutative rotations in three
dimensions.

It would be nice to fix the documentation.

Cheers,

Russell


Post a reply to this message

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