POV-Ray : Newsgroups : povray.newusers : arrays and random numbers : Re: arrays and random numbers Server Time
5 Sep 2024 16:20:19 EDT (-0400)
  Re: arrays and random numbers  
From: Robert Chaffe
Date: 9 Apr 2000 20:43:18
Message: <38f123a6@news.povray.org>
Perhaps resetting loop counters will do the trick?
Warning: untested!  New lines shown without ">" symbol ...

> [ snip ]
>
> #while (XPos < 100)
>   #while (ZPos < 100 )
>     #declare CityArray[XPos][ZPos]=RNum;
>     #while (FCount <= CityArray[XPos][ZPos])
>       object{Floor translate <0,FCount*8,0>}
>       #declare FCount = FCount + 1;
>     #end//while fcount
>     #declare ZPos = ZPos + 10;

       #declare FCount = 0;    // reset inner loop counter.

>   #end//while zpos
>   #declare XPos = XPos + 10;

     #declare ZPos = 0;    // reset middle loop counter.

> #end//while xpos

Does that help?   rc


Post a reply to this message

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