![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I am having trouble converting some of my #while loops into recursive macros
(where you call the macro from inside the macro). I seem to remember reading
something about it in the docs, but can't find it now. I can post some
specific problems if needed, but the recurring problem is "too many nested
macros", and if I don't get that, I get unexpected results that seem to
stem from lost values in variables.
Is there a tutorial around? Or does someone remember where it is in the
docs?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Bill DeWitt wrote:
>
> I am having trouble converting some of my #while loops into recursive macros
> (where you call the macro from inside the macro). I seem to remember reading
> something about it in the docs, but can't find it now. I can post some
> specific problems if needed, but the recurring problem is "too many nested
> macros", and if I don't get that, I get unexpected results that seem to
> stem from lost values in variables.
>
> Is there a tutorial around? Or does someone remember where it is in the
> docs?
In general, try to avoid recursion in POV. its far slower and more
memory consuming than a #while loop. (or a set of them).
i don't remember the limit, but it's easy to test it...
#version 3.1;
#macro test(N)
#debug concat(str(N,0,0),"\n")
test(N+1)
#end
test(0)
camera{ <0,0,0>,<1,1,1> }
sphere { <1,1,1>,0.02 pigment{colour rgb 1}}
That should suffice to count them ..
//Spider
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Spider says:
>
> In general, try to avoid recursion in POV. its far slower and more
> memory consuming than a #while loop. (or a set of them).
Considering the trouble I am having, I will find it easy to avoid
recursion. I thought it would be an easy way to change parameters while
zooming into a fractal, but I begin to doubt if it is worth it.
>
> That should suffice to count them ..
>
Blows up at 97, I was thinking about a million or so.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hmm, mandelbrot ???
Well, warp made a fractal in pov... Don't know where it is though..
Bill DeWitt wrote:
>
> Spider says:
> >
> > In general, try to avoid recursion in POV. its far slower and more
> > memory consuming than a #while loop. (or a set of them).
>
> Considering the trouble I am having, I will find it easy to avoid
> recursion. I thought it would be an easy way to change parameters while
> zooming into a fractal, but I begin to doubt if it is worth it.
>
> >
> > That should suffice to count them ..
> >
>
> Blows up at 97, I was thinking about a million or so.
--
//Spider -- [ spi### [at] bahnhof se ]-[ http://www.bahnhof.se/~spider/ ]
And the meek'll inherit what they damn well please
Get ahead, go figure, go ahead and pull the trigger
Everything under the gun
--"Sisters Of Mercy" -- "Under The Gun"
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |