|
![](/i/fill.gif) |
"Tim Attwood" <tim### [at] anti-spam comcast net> 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
|
![](/i/fill.gif) |