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:30:34 EDT (-0400)
  Re: Camera Navigation - Tilt and Pan Macro?  
From: Daniel Matthews
Date: 14 Nov 2001 22:58:58
Message: <2555262.FCf946Emhk@3-e.net>
Christopher Johnson wrote:

> 
> "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>
> 
>  }

I think this is the inverse of what I was thinking, I will have a play with 
it and see if it fits my needs. I guess I just need to look it the other 
way around. :o)

thanks.


Post a reply to this message

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