|
![](/i/fill.gif) |
> User-defined functions in povray are a bit tricky because their syntax,
> while similar to the SDL syntax, is actually separate and different.
> You can use SDL constructs to build up a function body, but it's just
> that. The function body will be parsed with a completely separate parser
> (which will then internally compile it to bytecode etc) *after* the SDL
> constructs have been evaluated. Again, you can think about the difference
> between the C preprocessor and the C compiler. It's the same kind of
> difference.
What do you mean with "SDL constructs"?
>
> What you are apparently trying to do is to create a user-defined
> function with a loop. That's not directly possible because the function
> syntax does not contain loop constructs.
>
> Not all hope is lost, though, because user-defined functions support
> recursion. You can use the select() function (to stop the recursion) and
> recursive calls in order to create loops. If you have ever coded in a
> functional language such as Lisp, that should be a piece of cake.
>
> I actually once (re)created the Mandelbrot set using recursive
> user-defined functions, so it's perfectly possible.
Sorry for my insistence but...
1) where can I find documentation about this select construct
2) Can you send me the code where you use recursive
> user-defined functions (if it's not a problem) ?
Very very thanks
Leo
Post a reply to this message
|
![](/i/fill.gif) |