|
![](/i/fill.gif) |
In POVRay all transformations (translating, scaling and rotating) are in
relation to the origin. So scaling an object which isn't located at the
origin will also scale its position. An object not located at the origin
will 'orbit' around the coordinate axes when being rotated.
Hence: Create the objects at the center, scale/rotate there and translate
afterwards.
Also it should be scale <2,1,1> instead of <2,0,0>. POVRay should print out
a warning message about that issue.
box { <3,3,3>,<-3,-3,-3>,
pigment { color Red }
}
sphere { <0,0,0>,1
pigment { color Blue }
scale <2,1,1>
translate <3,3,3>
}
sphere { <0,0,0>,1
pigment { color Blue }
scale <2,1,1>
translate <-3,-3,-3>
}
or somewhat shorter:
box { -3, 3
pigment { color Red }
}
sphere { 0,1
pigment { color Blue }
scale 2*x
translate 3
}
sphere { 0,1
pigment { color Blue }
scale 2*x
translate -3
}
Hope this helps
Regards Roman
Post a reply to this message
|
![](/i/fill.gif) |