|
|
I've hit a bit of a rock I haven't been able to climb over. The recursive
macro below is *supposed* to generate a linear sphere_sweep, generating 10
sphere positions for the sweep. It then uses the last coordinate as the
starting point for two other sweeps.
The coordinate calculations have a random element added to them to visualize
a contorted cone, essentially the segment of a root. My final objective is
to generate a complex root system. I added a color element, taken from
Samuel Benge's altered pyramid.pov example, to differentiate recursion
levels.
The problem I've run into is that the first recursion runs through the
coordinates used to position the first sphere in the next sphere_sweep but
doesn't reset them for the subsequent recursion. As a result, when the root
"branches" the first branch will appear to connected to the original branch,
and it's first branch connected to it, but the second branch will appear at
the different position then the end of the former branch...
Sound confusing? Sorry, but it has me stumped... The source of the same
name in p.b.s-f is ready to render so it should explain the problem better
then I. It's my first toy-around with a recursive macro so any help would
be appreciated.
Thanks,
-Chris-
Post a reply to this message
|
|
|
|
Check out my reply in p.b.s-f. It seems to work, although I'm not entirely sure
why the original doesn't.
The main change is duplication of the parameter block (see source), but I
tweaked a few other things also.
--
Margus Ramst
Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Post a reply to this message
|
|