|
![](/i/fill.gif) |
CreeD wrote:
>
> I had a fairly complex scene going and and I wanted to do basically this:
>
> camera {<0,10,-10> look_at <0,10,0>} //looks forward along z axis
> sphere {<0,9,-5>,.3 scale <0,0,2>}
>
> that is, scale a sphere to double its original size in the +z and -z
> directions,
> making an egg sort of shape. It was to be used as an endcap to a cylinder
> going from 5 to -5 along the z axis.
> -I checked the sphere coordinates to make sure I wasn't making it at +z
> instead
> of - z.
> -I checked the camera coordinates.
> -I checked the scale syntax to make sure I wasn't scaling just the texture.
> -I checked that the sphere's diameter was large enough to see.
> -I made it a bright red pigment to make sure it wasn't getting lost in the
> background.
> -it hadn't been translated in place, it was at the coordinates described.
>
> basically if I erased the scale <0,0,2> the sphere appeared where it ought
> to be just fine. If I put it back, it disappeared from the scene. I think
> I ended up making a larger one and flattening it along the y axis.
>
> But I'm still curious as to what happened.
It is a bit difficult to explain but suffice it to say that when you
scale an object that is not centered at the origin (i.e. at xyz = 0)
it has the same effect as translating the object. In this case you
are better off building your sphere at the origin, scaling it to
the dimensions that you need, and then translating it into position.
camera {<0,10,-10> look_at <0,10,0>}
sphere {<0,0,0>,.3 scale <1,1,2> translate <0,9,-5>}
Also you should always scale by a number smaller or greater than zero
or POV-Ray will automatically scale it to a value of one for you. In
the example you provided you had your scale set to <0,0,2> which
POV-Ray automatically adjusted to <1,1,2> for you. In this case it
really didn't matter but it is not a good habit to get into. In fact
if you look at the message window POV-Ray probably issued a warning
to this effect.
Cheers,
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
![](/i/fill.gif) |