|
|
Hello,
I would like to define a function with a while loop inside, like this :
#declare my_array = array[Imax] {
function ...
} // array of functions
#declare my_function = function {
#local res = 0;
#local I = 0;
#while (I < Imax)
#local res = res + my_array[I](x,y,z);
#local I = I + 1;
#end
res
}
but povray complains about x, y and z being vectors, not floats.
I know there is a sum(...) pattern which could achieve the same thing, but
I put a sum for the example, it could be whatever loop in a function,
which tries to use the x, y, z coordinates that fails.
Adrien Rebollo
Post a reply to this message
|
|