|
|
Wait, wait!!
Better yet, just re-initiate the 1st-level-object-creating-macro <ahem>
every time you reach an end point. Provided you also re-initiate the random
number stream with the same seed in every instance, you get identical
values. Just a matter of changing the overall scale and direction for each
instance/recursion level; these should therefore be params of the macro.
So it's really very similar to the recursive pyramid and sphereflake macros.
Margus
Margus Ramst wrote in message <371a10f9.0@news.povray.org>...
>I don't thin you have to stick "advanced" to every heading simply to
justify
>posting here :)
>
>Anyway, what you want seems simple enough. I won't discuss making the
>initial object. But as for adding it recursively - here's how I imagine it:
>
>You first generate the 1st level object. Save all the end points _and_
>directions of the respective branches in an array.
>Now, take a point in the array, and scale, rotate & translate both your 1st
>level object - and all the points & directions in the array - relative to
>the current point and the corresponding direction.
>You now have a second-level instance of the object and its end
>points/directions. Repeat the process to the desired recursion level,
>similar to the "pyramid" example macro...
>
>I know this didn't come out all that well. Hopefully you got the main idea.
>I'll try to create an example macro when I have more time.
>
>Margus
>
Post a reply to this message
|
|