Bill DeWitt wrote:
>
> Is there any further information on arrays in POV (besides the docs)?
> Specifically I would like to see ways of declaring array elements
> mathematically rather than manually. Perhaps in loops or with a formula.
Not sure what you mean, but here's an examlpe of what I'd call automatic
declaration:
#declare A=array[100]
#declare N=dimension_size(A,1); //Auto get the number of elements
#declare C=0;
#while(C<N)
#declare A[C]=1;
#declare C=C+1;
#end
This automatically initializes all array elements to 1.
You can of course replace 1 with an arbitrary formula etc etc.
Margus
Post a reply to this message
|