|
![](/i/fill.gif) |
I have the following code to produce a place of blocks, why is it that it
only produces 1 row?
#declare FStoneH = 1;
#declare FStoneW = 6;
#declare FStoneL = 6;
#declare FMortar = 0.2;
#declare FZtrans = FStoneL+FMortar;
#declare TunHight = 30;
#declare TunWidth = 60;
#declare TunLength = 200;
#declare FZpos = 0;
#declare FloorTrans = (TunWidth/2-FStoneW/2);
#declare FloorWidth = 0;
#while (FloorWidth < TunWidth )
#while (FZpos < TunLength)
object{
Flagstone
translate <FloorTrans,0,FZpos>
#declare FZpos = FZpos+FZtrans;
}
#end
#declare FloorWidth = FloorWidth+FStoneW;
#declare FloorTrans = FloorTrans-FStoneW/2;
#end
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
How do you expect it to work?
See http://iki.fi/warp/povVFAQ/whileloops.html for a tutorial.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
It's looks like you're forgetting to reset "FZpos" before the second loop.
-Chris-
Thomas Lake <tla### [at] home com> wrote in message
news:3aff2d0a$1@news.povray.org...
> I have the following code to produce a place of blocks, why is it that it
> only produces 1 row?
>
> #declare FStoneH = 1;
> #declare FStoneW = 6;
> #declare FStoneL = 6;
>
> #declare FMortar = 0.2;
> #declare FZtrans = FStoneL+FMortar;
>
> #declare TunHight = 30;
> #declare TunWidth = 60;
> #declare TunLength = 200;
>
> #declare FZpos = 0;
> #declare FloorTrans = (TunWidth/2-FStoneW/2);
> #declare FloorWidth = 0;
>
> #while (FloorWidth < TunWidth )
>
> #while (FZpos < TunLength)
>
> object{
> Flagstone
> translate <FloorTrans,0,FZpos>
>
> #declare FZpos = FZpos+FZtrans;
> }
>
> #end
>
> #declare FloorWidth = FloorWidth+FStoneW;
> #declare FloorTrans = FloorTrans-FStoneW/2;
>
> #end
>
>
Post a reply to this message
|
![](/i/fill.gif) |