|
![](/i/fill.gif) |
D103 <nomail@nomail> wrote:
> #declare X1=-1.5; //in the scene file these are equal to the v_length of the
> appropriate values.
> #declare Z1=-1.5;
> #declare Cnt=0;
> #while(X1<=1.5)
> #while(Z1<=1.5)
> #if(Cnt>=15)
> #debug "Cnt = illegal value.\n"
> #else
> #debug "Cnt is within legal range.\n"
> #end
> //#declare Pts[Cnt]=<X1, 0, Z1>;
> sphere { 0, 0.1 pigment { White } translate <X1, 0, Z1> }
> #declare Z1=Z1+1;
> #declare Cnt=Cnt+1;
> #end
> #declare X1=X1+1;
> #declare Z1=-1.5;
> #end
You seem to have very complicated ways of performing nested loops.
What's wrong with the traditional way of doing nested loops? In other
words:
#declare Cnt = 0;
#declare X1 = -1.5;
#while(X1 <= 1.5)
#declare Z1 = -1.5;
#while(Z1 <= 1.5)
...
#declare Z1 = Z1 + 1;
#declare Cnt = Cnt + 1;
#end
#declare X1 = X1 + 1;
#end
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |