|
|
Adrien Rebollo wrote:
>
> Hello,
>
> I would like to define a function with a while loop inside, like this :
>
> [...]
>
> 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.
You are mixing up the different levels in a POV-Script. #declare/#local
work at parse time and not during rendering, therefore
#local res = res + my_array[I](x,y,z);
tries to assign a value to res while parsing and expects x, y and z to be
symbols for 1 unit vectors like elsewhere in a POV-Script.
For how to use arrays of functions and loops in functions see the
'IC_Merge_Array()' macro in the IsoCSG include file.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|