POV-Ray : Newsgroups : povray.general : Transform help please : Re: Transform help please Server Time
4 Nov 2024 23:15:17 EST (-0500)
  Re: Transform help please  
From:
Date: 31 Aug 2003 21:30:11
Message: <3f52a123@news.povray.org>
Hi Alf,

your declaration of the Up variable is correct, but to undo a

   rotate Up

which is the same as

   rotate Up.x*x // or <Up.x, 0, 0>
   rotate Up.y*y // or <0, Up.y, 0>; in your code, Up.y=0
   rotate Up.z*z // or <0, 0, Up.z>

you will have to undo these rotations in *reverse* order, i.e.

   rotate -Up.z*z
   rotate -Up.y*y
   rotate -Up.x*x

so the mistake is in the next-to-last line: replace

   rotate -Up

by
   rotate -Up.z*z
   rotate -Up.x*x

(rotate -Up.y*y is not required here because Up.y=0)
This will work as intended.

   Sputnik


Post a reply to this message

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