|
![](/i/fill.gif) |
Tor Olav Kristensen wrote:
> Slime wrote:
>
>>> If the functions supported true recursion it would be rather easy:
>>>
>>> #declare MandIter =
>>> function(n, Re, Im, Zr, Zi)
>>> { select(n>50 | Zr*Zr+Zi*Zi > 2, 0,
>>> MandIter(n+1, Re, Im, Zr*Zr-Zi*Zi+Re, 2*Zr*Zi+Im), n/50)
>>> }
>>>
>>> #declare Mandel = function(Re, Im) { MandIter(0, Re, Im, Re, Im) }
>>>
>>> (Now you could do for example "pigment { function { Mandel(x,y) }
>>
>>
>> ... }".)
>>
>> And you can! Looks good. =)
>
> ...
>
> Woaw ! That's nice. AFAIR from the pre-beta test period for v3.5,
> it should not be possible for users to define recursive functions.
>
> But obviously this has changed since then. (Unintentionally ?)
Here's what happened when I tried the same with v3.5:
Persistence of Vision Ray Tracer(tm) for Windows.
...
This is version 3.5.icl.win32.
...
File: E:\Raytracinger\RecursiveFunctionTest.pov Line: 14
)
} <----ERROR
Parse Error: Recursive function calls are not allowed!
Returned from renderer with error status
This time I also checked the output when rendering with v3.6:
Persistence of Vision Raytracer(tm) for Windows.
...
This is version 3.6.1.icl8.win32.
...
File: E:\Raytracinger\RecursiveFunctionTest.pov Line: 14
Possible Parse Error: Recursive function calls are not allowed!
- So it should still not be possible.
--
Tor Olav
http://subcube.net
http://subcube.com
Post a reply to this message
|
![](/i/fill.gif) |