POV-Ray : Newsgroups : povray.newusers : Changing cameraposition with buttonclicks : Re: Changing cameraposition with buttonclicks Server Time
28 Jul 2024 16:28:10 EDT (-0400)
  Re: Changing cameraposition with buttonclicks  
From: Tim Attwood
Date: 29 May 2008 17:43:44
Message: <483f2390@news.povray.org>
> What is the API for PovRay?

POV is a stand-alone program that can be
invoked from the comand line, not a library
to call from other programs.

It would be easier to calculate a camera
rotation in your own code than to try to
make POV do it for you.
Say for example you have a previously
rendered image 640x480 with a 67.38
degree horizontal viewing angle, and
a 50.54 degree vertical veiwing angle.
Then a click coords on the image (X,Y), this
would mean that the camera could be rotated
to point at that spot...
rotate <(Y/480-0.5)*50.54, (X/640-0.5)*67.38, 0>
all you need to do is keep track of your previous
rotation.


Post a reply to this message

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