From: clipka
Subject: Re: problem with functions.inc
Date: 2 Sep 2015 09:58:45
Message: <55e70095$1@news.povray.org>
Am 01.09.2015 um 13:25 schrieb Norbert Kern:
> Hi,> here is minimal code for the famous burning ship fractal.> It renders fine as long as I don't include functions.inc (in another context I> need functions.inc).> Does anybody know the reason?
Yes: POV-Ray doesn't officially support recursive functions.
It works in /some/ cases, but has some quite severe limitations; my
personal recommendation would be to create one function for each level
of recursion; that shouldn't be too difficult using a #for loop and the
Parse_String() macro from strings.inc.
scott <sco### [at] scottcom> wrote:
> >> declaring *any* function before your IterFn causes the crash.> >> >> > Thanks very much>> You can get around the problem by unrolling the iteration into 300> different functions in an array:
Wouldn't it use less memory to have only two functions that you #declare and
#undef within the loop?
http://news.povray.org/povray.binaries.scene-files/thread/%3C4ddda4d9%40news.povray.org%3E/
"Samuel Benge" <stb### [at] hotmailcom> wrote:
> scott <sco### [at] scottcom> wrote:> > You can get around the problem by unrolling the iteration into 300> > different functions in an array:>> Wouldn't it use less memory to have only two functions that you #declare and> #undef within the loop?
Nevermind, I'm pretty sure using only two doesn't save memory :/
From: clipka
Subject: Re: problem with functions.inc
Date: 2 Sep 2015 12:31:47
Message: <55e72473$1@news.povray.org>
Am 02.09.2015 um 18:06 schrieb Samuel Benge:
> "Samuel Benge" <stb### [at] hotmailcom> wrote:>> scott <sco### [at] scottcom> wrote:>>> You can get around the problem by unrolling the iteration into 300>>> different functions in an array:>>>> Wouldn't it use less memory to have only two functions that you #declare and>> #undef within the loop?> > Nevermind, I'm pretty sure using only two doesn't save memory :/
... and you're pretty right ;)