|
|
> On Sun, 14 Oct 2001 20:35:01 -0400, F.Audet wrote:
> >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 ?!?
>
> Is the problem perhaps that you're trying to do it with beta 5 of POV 3.5?
> There was a problem with #while loops that caused crashes; it's been fixed
> in beta 6.
No, I am still working with the 3.1 version because my computer does
not accept 800*600 screen minimum requirement... I plan to solve
this problem soon, with a more recent computer...
I decided to do what I wanted to do in simulating an array
with two #while loops, and it finally worked.
But if you could see why the famous array
did not work, here is the code :
#declare s1 = seed(1);
#macro bin_01 () // note that it works well with a simple while, without array....
#local obj_temp =
#if ( rand(s1) <= 0.5 )
object { nice_zero }
#else
object { nice_one }
#end
object { obj_temp }
#end
#declare YOUR_ARRAY = array[20][20]
#declare i = 0;
#while (i<20)
#declare j=0;
#while (j<20)
#declare YOUR_ARRAY[i][j] = bin_01()
#declare j=j+1;
#end
#declare i=i+1;
#end
> Alex Pilot
>
> --
> #macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
> -z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
> P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end
> Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}
Post a reply to this message
|
|