|
![](/i/fill.gif) |
--------------( oo )--------------
Ok thanks. I did it in an Other way but when I made experimentations with
arrays, I had error. I guess this is the Initialization of the array that I
did wrong. I read the Help files serval times, but I didn't noticed my bug.
It save me a lot of time, Thanks again ABX it is well appreciated.
I posted Images on the povray.binaries.images.
--------------( oo )--------------
> > Is there a way to modify arrays?
>
> Of course.
>
> > (Like changing a Value of Only one Cell?)
> > It doesn't seems to be possible. This why I'm using Parse_Strings. When
I'm
> > using a 20*20*20 3D grid It is 8000 operation of creating a new sub
array.
>
> below are all features built-in POV-Ray SDL
>
> #declare MyArray = array[3][2]; // define dimensions
> #declare MyArray[0][0] = 0; // fill content
> #declare MyArray[0][1] = 1; // fill content
> #declare MyArray[1][0] = 2; // fill content
> #declare MyArray[1][1] = 3; // fill content
> #declare MyArray[2][0] = 4; // fill content
> #declare MyArray[2][1] = 5; // fill content
> #declare Value = MyArray[1][0]; // get value from value
> // refill content in loop;
> #declare D1 = 0;
> #while (D1 < dimension_size( MyArray , 1 ) )
> #declare D2 = 0;
> #while (D2 < dimension_size( MyArray , 2 ) )
> #declare MyArray[D1][D2] = sin(D1+D2); // any value
> #declare D2 = D2 + 1;
> #end
> #declare D1 = D1 + 1;
> #end
> // read content in loop;
> #declare D1 = 0;
> #while (D1 < dimension_size( MyArray , 1 ) )
> #declare D2 = 0;
> #while (D2 < dimension_size( MyArray , 2 ) )
> #debug "MyArray["
> #debug str(D1,0,0)
> #debug ","
> #debug str(D2,0,0)
> #debug "]="
> #debug str(MyArray[D1][D2],0,-1)
> #debug "\n"
> #declare D2 = D2 + 1;
> #end
> #declare D1 = D1 + 1;
> #end
>
> Apart from built-in features there is also standard include file called
> "arrays.inc" with set of macros to operate on arrays. There is separate
section
> about it in documentation.
>
> > Then Read/Write with Parse_Strings is highly time consuming.
>
> No need for it IMO.
>
> > Where Should I post a JPEG of the project?
>
> in povray.binaries.images group as stated in
> http://news.povray.org/povray.announce.frequently-asked-questions/
>
> ABX
Post a reply to this message
|
![](/i/fill.gif) |