prev index next |
Cameras
and Lighting
|
POV-Ray Tips,
Tricks, and Techniques |
Camera Pan?
|
lee inquires: | Could someone please tell me what the best way to do
a slight pan of the camera in POV-Ray is? I am doing a series of
renderings where the camera moves, and needs to "turn its head" so to speak.
Obviously rotation is out of the question, and I am finding that changing
the look_at values is a nightmare.
|
|
Christian Dummer explains:
|
Well, POV-Ray does include sine & cosine functions,
so you could use them to modify the look_at or camera position value. (I
don't have POV-Ray docs at hand now, so this will be a theorical class
only ;-), you will have to translate everything into POV-Ray syntax).
Lets say you use "clock" as the number of degrees to rotate (assuming that you will only rotate on the x-y plane); the camera position <a,b,c> is to be considered the center of this rotating movement.The radius of the circle described by this movement will be "r". Now, <x,y,z> will be the position of your look_at point, with "z" being an arbitrary point (as said, we will be rotating on the x-y plane only). Use the following: x = a + r * cos(rad_clock)
...usually, you have to convert the clock value from degrees (0-360)
to radians. To do so, use
I hope this helps you out... |
|