POV-Ray : Newsgroups : povray.general : Define camera angle from a given right : Re: Define camera angle from a given right Server Time
30 Jul 2024 10:21:17 EDT (-0400)
  Re: Define camera angle from a given right  
From: gregjohn
Date: 2 Mar 2009 23:10:00
Message: <web.49acac9d78557ac434d207310@news.povray.org>
"Tim Attwood" <tim### [at] anti-spamcomcastnet> wrote:
> > Q: Has anyone seen a more descriptive diagram of the camera?
>
> This is how I look at it... the up, right, and direction vectors all
> really share the same origin, but they are used to describe the
> viewing plane that the direction vector points at the middle of.
>

Thanks greatly.  Starting with a knowledge of the importance of just those three
terms, I came up with the answer: the direction defines half the distance to the
plane at which objects will be seen at up and right distances from the origin.
That information is power.

The diagram in the docs is great for teaching newbies and it does not lie. But
it has useless units "+0.5, -0.5" and provides no information about what
direction does.

Anyway, here's the code inspired by Tim's own.

#include "colors.inc"
#declare iwih=image_width/image_height;
#declare azee=0.0001+100*clock;

camera {
  direction z*azee
  up y
  right     x*image_width/image_height
}

background {White}

light_source {
  <0, 0, 0>
  color rgb <1, 1, 1>
  translate <30, 30, -30>
  shadowless
}

sphere{<-iwih,-1,0>,0.05 translate 2*azee*z }
sphere{<iwih,1,0>,0.05 translate 2*azee*z}
box{<-iwih,-1,0>,<iwih,1,0.001>
        translate 2*z*azee*1.01
        pigment{Red}}


Post a reply to this message

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