POV-Ray : Newsgroups : povray.general : Positioning a camera : Re: Positioning a camera Server Time
1 Aug 2024 20:07:35 EDT (-0400)
  Re: Positioning a camera  
From: Rune
Date: 18 Apr 2005 05:08:25
Message: <42637909$1@news.povray.org>
Cesar wrote:
> Ok... Could I use look-at and use my recently calculated up-vector as
> sky? Would that work?

That should work, yes.

(with look_at = location + [your calculated direction])

I don't agree with Christoph though that your original approach doesn't make 
sense. You just need to really make sure the vectors are perpendicular.

Untested code:

#include "math.inc"
#declare cam_direction = <0,  1, 0>;
#declare cam_up = <0.198669, 0, 0.980067>;
#declare cam_right = <1.30349, 0, -0.26423>;

camera {
  direction cam_direction
  up VPerp_Adjust(cam_up,cam_direction)*vlength(cam_up)
  right vcross(cam_up,cam_direction)*vlength(cam_right)
}

> Problems aside, this subject brings me to another question: is there
> a way to make povray accept the non-perpendicular vectors and
> generate a distorted image? I could be interested in that...

Yes, if you turn off the vista buffer by using the -uv command line setting.

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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