POV-Ray : Newsgroups : povray.advanced-users : Camera Navigation and Orientation : Re: Camera Navigation and Orientation Server Time
29 Jul 2024 16:27:41 EDT (-0400)
  Re: Camera Navigation and Orientation  
From: Christopher Johnson
Date: 17 Nov 2001 15:30:29
Message: <3bf6c8e5@news.povray.org>
"Daniel Matthews" <dan### [at] 3-enet> wrote in message
news:140### [at] 3-enet...
> That looks nifty, I will have a play with it in a couple of days and if my
> NSEW system works with it I will post the resulting code.

How does you NSEW work?  For basic camera and target placement, I was just
using Rotsph to create a point that was X degree's above or below the +z and
Y degree's to the left or right and then Z units along the resulting vector.

#macro Rotsph(Tilt, Pan, Distance)
        #local result = vrotate(<0,Distance,0>,<(90-Tilt),Pan,0>);

        result
#end

It works out well for when you have an object at the origin and you just
want to view it from different angles. I'd just define the camera as

Camera
    location Rotsph (Angle1,Angle2,Distance)
    look_at <0,0,0>

It was simple and worked well for placing other objects around the focal
point, such as lights.

I'm going to try to neaten up the Camera include file though.  Mostly to
make it easier to define the order in which the transformations take place.
In the other hand, it works now, and if I mess with it too much I'll end up
screwing something up.  It's been entirely too long since I've had to use
trig.

CJ


Post a reply to this message

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