|
|
> Hi everybody,
>
> I have the following toy scene, but it does not produce the correct output: the
> sphere is not a sphere but an egg! what am I doing wrong? anyone help me?
>
> thanks!
>
> here the scene:
>
> #include "colors.inc"
> #include "stones.inc"
> #include "woods.inc"
> #include "textures.inc"
> background { color White}
> camera {
> location<50,0,0>
> look_at<0,0,0>}
> light_source {
> <20, 0, 0> color White
> }
>
>
> sphere {
> <0,0,0> , 21
> pigment {
> color rgbt<1,1,1,0.7> }}
>
>
You render that at what resolution? With what aspect ratio?
If I render it with a classical 4:3 aspect ratio, then the sphere
actualy looks circular.
But, if I render at 100 by 50, I get an hirizontal elliptical image. If
you render a square image, or a prortrait, then you ger a vertical ellipse.
You can adjust the aspect ratio by adding the following to your camera:
up y
right x
This example is for a square image.
Some more examples follows:
up 2*y right x // for a 1:2 aspect ratio, tall and narrow.
up y right x*3/4 // 3:4 ratio, portrait.
up y right 3*x // for a 3:1 aspect ratio, prety whide image.
up y right x*4/3 // Normal 4:3 aspect ratio.
Another thing:
Whenever a sphere is NOT at the center of the scene, it will appears
elliptical. It's normal. Your scene is projected onto a plane. A sphere
define a cone and a cone-plane intersection at a non-perpendidular angle
is an ellipse.
Sample to illustrate that effect:
replace your sphere with this:
union{
sphere{0,3 pigment{rgb<0.1, 0.3, 1>}}
sphere{<0,9,0>,3}
sphere{<0,-9,0>,3}
sphere{<0,9,9>,3}
sphere{<0,-9,9>,3}
sphere{<0,9,-9>,3}
sphere{<0,-9,-9>,3}
sphere{<0,0,-9>,3}
sphere{<0,0,9>,3}
pigment{rgb<0.2,1,0.3>}
scale 2
}
Here, only the center (blue) sphere looks circular. The "distortion" is
normal and should be expected.
Alain
Post a reply to this message
|
|