|
|
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
|
|
|
|
"StephenS" <ssh### [at] ottawanet> wrote in message
news:4039e4b8@news.povray.org...
>
> 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?
>
> 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>
> }
Um, because 'right' is still designated as a positive x direction? Even
though the rest would make +x be on the left I guess that's inverting the x
axis. I'm not 100% sure about it.
Anyway, is there some reason you can't use 'look_at' and 'angle' instead of
'direction'? I'm guessing, you did it this way to try and echo the
parameters of the two types of cameras since angle gets used differently, so
only way was this?
Bob H.
Post a reply to this message
|
|