POV-Ray : Newsgroups : povray.general : Array... : Re: Array... Server Time
7 Aug 2024 09:23:44 EDT (-0400)
  Re: Array...  
From: F Audet
Date: 14 Oct 2001 20:38:36
Message: <3BCA2F34.20A7BB2E@sympatico.ca>


> "F.Audet" <flo### [at] sympaticoca> ha scritto nel messaggio
> news:3BC9AFCA.9B469579@sympatico.ca...
> >     Does anyone could give me
> > some "basic" principles about Array !
> >
> > I draw a 3d zero and a 3d one,  which objects
> > can be choosen randomly from a macro....
> > The macro is done and works well.
> > Each time I need a number,  the macro
> > randomly return a zero or a one.
> > I only need to put this "binary_01 ( )" macro
> > inside an array,  say,  20*20.
> >
> >    Alex Pilote
> >
> > ...I know I could use a loop....
>
> In fact:
>
> #declare YOUR_ARRAY = array[20][20]
> #declare i = 0;
> #while (i<20)
> #declare j=0;
> #while (j<20)
> #declare YOUR_ARRAY[i][j]= binary_01();
> #declare j=j+1;
> #end
> #declare i=i+1;
> #end
>
> Done.

I don't know why,  but this code doesn't work
with the object which I have to reproduce....
I have also tried this code with a simple sphere;
it doesn' t work anymore.

So,  is there another way of using Array
without using the while directive ?!?

Thank you,            Alex


Post a reply to this message

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