POV-Ray : Newsgroups : povray.binaries.images : Why does this not work? Server Time
18 Aug 2024 10:21:50 EDT (-0400)
  Why does this not work? (Message 1 to 4 of 4)  
From: Thomas Lake
Subject: Why does this not work?
Date: 13 May 2001 20:55:38
Message: <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

From: Bob H 
Subject: Re: Why does this not work?
Date: 13 May 2001 22:22:30
Message: <3aff4166$1@news.povray.org>
I believe you have got to reset FZpos in the outer loop.

Bob H.

"Thomas Lake" <tla### [at] homecom> 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?


Post a reply to this message

From: Warp
Subject: Re: Why does this not work?
Date: 14 May 2001 08:40:40
Message: <3affd248@news.povray.org>
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

From: Chris S 
Subject: Re: Why does this not work?
Date: 14 May 2001 09:42:06
Message: <3affe0ae$1@news.povray.org>
It's looks like you're forgetting to reset "FZpos" before the second loop.

-Chris-

Thomas Lake <tla### [at] homecom> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.