|
|
Hi all!
> object{Object translate <-Minimum.x,-Minimum.y,-Minimum.z> scale
> (1/MaxLength)}
imagine a box:
box { <1,1,1>,<2,2,2> }
Minimum would be <1,1,1>, Maximum <2,2,2>. translating it by:
translate <-Minimum.x,-Minimum.y,-Minimum.z>
(which is btw the same as "translate -Minimum") would result in the
following box:
box { <0,0,0>,<1,1,1> }
this box is not centered at the origin.
This one is better:
translate -(Minimum+Maximum)/2
(Minimum+Maximum)/2 is the center of the bounding box.
Rest looks fine (didn't test it though)
HTH,
Florian
--
//=================[web: http://www.torfbold.com]==================\\
#local a=-5;#while(a<5)sphere{<sin(a*pi)*5a*10pow(a,5)*.01>sin(a*a*a*
.1)+1pigment{rgb 9*z}}#local a=a+.01;#end camera{look_at-y*10location
<8,-3,-8>*10}// [www.povray.org] [www.imp.org] [www.irtc.org]
Post a reply to this message
|
|