POV-Ray : Newsgroups : povray.advanced-users : Camera Navigation - Tilt and Pan Macro? : Re: Camera Navigation - Tilt and Pan Macro? Server Time
29 Jul 2024 16:22:44 EDT (-0400)
  Re: Camera Navigation - Tilt and Pan Macro?  
From: Christopher Johnson
Date: 14 Nov 2001 21:40:17
Message: <3bf32b11$1@news.povray.org>
"Daniel Matthews" <dan### [at] 3-enet> wrote in message
news:136### [at] 3-enet...
> Has anyone developed a macro for controlling a camera with "traditional"
> instructions? I am working on a project where I need to set up and store
> multiple views of a site. I use CASE to select a camera and I have a NSEW
> system for camera position and view direction, but no "tilt" or "pan".
>
> Any ideas?
>


"Daniel Matthews" <dan### [at] 3-enet> wrote in message
news:136### [at] 3-enet...
> Has anyone developed a macro for controlling a camera with "traditional"
> instructions? I am working on a project where I need to set up and store
> multiple views of a site. I use CASE to select a camera and I have a NSEW
> system for camera position and view direction, but no "tilt" or "pan".
>
> Any ideas?
>

One method I tend to use is sherical coordinates for the camera.  I like to
be able to spin the camera around an object and change the linear distance.
May not be exactly what your looking for but it makes an effective "boom"
set-up.

#macro Rotsph(Declination, Rotation, Distance)
        #declare result =
vrotate(<0,Distance,0>,<(90-Declination),Rotation,0>);
        result
#end

This simply converts  the rotational coordinates to cartesian.

then define the camera

#declare Location = <35,180,100>; // 35degrees up from the xz plane, 180
degress counter clockwise, and 100 units away.
#declare Lo = Rotsph (Location.x,Location.y,Location.z);

camera {
  location <Lo.x,Lo.y,Lo.z>
  look_at  <0,0,0>

 }


Post a reply to this message

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