|
![](/i/fill.gif) |
Haakon Meland Eriksen wrote:
> I would like to do something like this
>
> *
> **
> ***
> **
> *
>
> and decrement the number of objects in one direction as the loops progress. How
> can I do this correctly? This does not work.
>
> #declare IndexX = 0;
>
> #while (IndexX <= 9)
> #declare EndZ = 9;
> #declare IndexZ = 0;
>
> #while (IndexZ <= EndZ)
>
> sphere { <IndexX,1,IndexZ>, 0.1 texture {pigment{color Red}}}
> #declare EndZ = EndZ - 1;
> #declare IndexZ = IndexZ + 1;
>
> #end
>
> #declare IndexX = IndexX + 1;
> #end
>
> Cheers,
> Haakon
>
>
>
>
#declare X = -9;
#declare EndZ = -1;
#while (X <= 9)
#if ( X < 0 )
#declare EndZ = EndZ + 1;
#else
#declare EndZ = EndZ - 1;
#end
#declare Z = 0;
#while (Z <= EndZ)
sphere { <X,1,Z>, 0.1 texture {pigment{color x}}}
#declare Z = Z + 1;
#end
#declare X = X + 1;
#end
Post a reply to this message
|
![](/i/fill.gif) |