POV-Ray : Newsgroups : povray.general : Need help understanding Camera, direction : Need help understanding Camera, direction Server Time
3 Aug 2024 12:21:50 EDT (-0400)
  Need help understanding Camera, direction  
From: StephenS
Date: 23 Feb 2004 06:32:08
Message: <4039e4b8@news.povray.org>
The following code renders as expected. Perspective and spherical camera
look to the right (direction <.25,0,1>) and the box appears to the left of
center.

light_source {
  <1,19,-14>
  color rgb <1,1,1>
}
box {-1,1
  pigment{rgb<0,1,0>}
  scale 0.2
  translate <0,0,3>
}

camera {
  spherical
    angle 40 80
  location  <0,0,0>
  direction <0,0,1>
//  direction <.25,0,1>
  up        <0,1,0>
  right     <4/3,0,0>
  sky       <0,1,0>
}
/*
camera {
  perspective
  location  <0,0,0>
  direction <0,0,1>
//  direction <.25,0,1>
  up        <0,1,0>
  right     <4/3,0,0>
  sky       <0,1,0>
}
*/

The following example confuses me. I have switched the y and z co-ordinates
but not mirrored x. The spherical camera look to the left (+x goes to the
left) and the box appears to the right of center. The perspective camera
however seems to look to the right (why?) and the box appears to the left of
center. I would expect to have both the perspective and spherical cameras to
behave the same. How am I misinterpreting the direction vector?

light_source {
  <1,-14,19>
  color rgb <1,1,1>
}
box {-1,1
  pigment{rgb<0,1,0>}
  scale 0.2
  translate  <0,3,0>
}

camera {
  spherical
    angle 40 80
  location  <0,0,0>
  direction <0,1,0>
//  direction <.25,1,0>
  up        <0,0,1>
  right     <4/3,0,0>
  sky       <0,0,1>
}
/*
camera {
  perspective
  location  <0,0,0>
  direction <0,1,0>
//  direction <.25,1,0> // not expected
  up        <0,0,1>
  right     <4/3,0,0>
  sky       <0,0,1>
}
*/


Post a reply to this message

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