POV-Ray : Newsgroups : povray.newusers : Help setting up camera for orbit : Re: Help setting up camera for orbit Server Time
4 Jul 2024 14:21:53 EDT (-0400)
  Re: Help setting up camera for orbit  
From: bobsta
Date: 8 Sep 2010 04:15:01
Message: <web.4c8744454444b3bc6ac940d0@news.povray.org>
Hi

I now need to modify my camera orbit slightly so that I start at a particular
angle, stop at a particular angle rendering a number of scenes in between
(number of frames, start and stop angle are determined at run time). I also need
to enable both clockwise and anticlockwise rotations

Thus I need something like

rotate -z*(startAngle+(clock*stopAngle))

or rotate +z*(startAngle+(clock*stopAngle))

depending on the orientation ((anti)clockwise) of the orbit.


i) How do I pass the parameters startAngle and stopAngle correctly into a
generic script?

ii) It may happen that during the camera orbit that the modulus of the term in
brackets is < 0 or >360 degrees? Does povray do bounds checking to ensure 0 <
angle < 360 ? Or can I safely rely on basic trigonometry to give the correct
mapping

e.g. 365 degrees => +5 degrees and -27 degrees =>+333 degrees

iii) To be more general I would like to allow the camera to rotate around the
look at vector and then orbit the now rotated camera about the scene? This means
that I need to update the up vector accordingly. Given that I am already
translating the scene to be centred at <0 0 0> what is
the easiest way to accomplish this: should I rotate the scene in the opposite
direction by the appropriate angle, or the camera in the desired direction.

Thanks


Post a reply to this message

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