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
|