POV-Ray : Newsgroups : povray.general : HELP !!! "Camera vectors are not perpendicular" : Re: HELP !!! "Camera vectors are not perpendicular" Server Time
4 Nov 2024 13:04:07 EST (-0500)
  Re: HELP !!! "Camera vectors are not perpendicular"  
From: Christian Walther
Date: 26 Dec 2003 05:58:44
Message: <pan.2003.12.26.10.58.43.742449@gmx.ch>
MrJuB wrote:

> camera {    // This one posts a warning
>   orthographic
>   angle 40
>   location < -1500,1000,-1600>
>   look_at <-100,-200,500>
> }
> 
> camera {    // This one doesn't
>   orthographic
>   angle 35
>   location < -1500,1000,-1600>
>   look_at <-100,-200,500>
> }


That sounds like a bug to me. According to the documentation, angle only
changes the length of the direction vector, location is a fundamental
camera parameter on its own (independent of up, right, direction), and
look_at only rotates the camera, none of which should change the angles
between up, right and direction.

Furthermore, the warning disappears if you scale location and look_at
smaller:

camera {    // no warning  orthographic  angle 40  location <
-150,100,-160>  look_at <-10,-20,50>}

Adding some debug code outputting the camera vectors to the POV-Ray source
shows that it is indeed a precision issue: In the first case,

  right = <1692.664786, 0.000000, -1128.443191>
  up = <364.320650, 1381.382466, 546.480975>
  direction = <0.915289, -0.784534, 1.372934>
  right.up = -1.589516e-10
  right.direction = -1.110369e-13
  up.direction = 1.941461e-13
  epsilon = 1.000000e-10

i.e. because right and up are so long, |right.up| > epsilon. Maybe the
vectors should be normalized before taking their dot product, or something
like this.

 -Christian


Post a reply to this message

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