|
![](/i/fill.gif) |
Hi,
Dennis Milller wrote:
>
> I came across this code and have on question. If the xcounter and zcounter
> are identical, why can't they be interchanged in the translate statement?
> The image changes dramtically if I substite "zcounter" for "xcounter" or
> vice versa, yet the "declare statements seem to do exactly the same thing.
> Any clues?
> #declare r1 = seed(13);
> #declare xcounter = 0;
> #while (xcounter < 50)
> #declare zcounter = 0;
> #while (zcounter < 50)
> box {<-.25,-.25,-.25>, <.25,.25,.25>
>
> translate <xcounter,rand(r1),zcounter> // rand(r1)
> pigment { color rgb <1,1,1> } finish {metallic}}
>
> #declare zcounter = zcounter + 1;
> #end
> #declare xcounter = xcounter + 1;
> #end
you can't interchange them, because of the call to the
random-function...
if you interchange the xcounter and zcounter in the translate statement,
you are going to mirror your image on the x=z plane.
(e.g. if you compare the boxes with xcounter==zcounter in the two images
you will notice that they didn't change).
HTH
ARUN
Post a reply to this message
|
![](/i/fill.gif) |