|
|
Wasn't it Brent G who wrote:
> I can't figure out how to get the stupid while loops to create a
>checkerboard shape :-/ This is what I've gotten so far (the MyGrass
>Objects are both 5x5 shapes):
>
>#declare X = 0;
>#while (X <= 5)
>
> #declare Z = 0;
> #while(Z <= 6)
>
> object { MyGrass1 translate <-12.5-(X*5),0,1.9+(Z*5)> }
> object { MyGrass1 translate <12.5+(X*10),0,1.9+(Z*5)> }
>
> #declare Z = Z + 2;
> #end
>
> #declare X = X + 2;
>#end
You might consider doing something like this:
#declare Chequer = union {
object {MyGrass1}
object {MyGrass2 translate <5,0,0>}
object {MyGrass1 translate <5,0,5>}
object {MyGrass2 translate <0,0,5>}
}
#declare X = 0;
#while (X <= 5)
#declare Z = 0;
#while(Z <= 6)
object { Chequer translate <-12.5-(X*5),0,1.9+(Z*5)> }
object { Chequer translate <12.5+(X*5),0,1.9+(Z*5)> }
#declare Z = Z + 2;
#end
#declare X = X + 2;
#end
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|