|
|
Yeah, recursion is what you need. A few month ago, i also write a tree-macro
only for fun, which essential structure is like this:
#macro Tree(a,b,r,n)
#if (n=0)
cone { a,r, b,0.8*r }
#else
#local d=b-a;
#local c=a+0.5*d;
union{ cone {a,r, b,0.8*r }
Tree(c,c+0.4*vrotate(d,-45*z),0.9*r,n-1)
Tree(b,b+0.3*vrotate(d,45*z),0.8*r,n-1)
Tree(b,b+0.9*vrotate(d,3*z),0.8*r,n-1)}
#end
#end
At the end my macro is a bit complexer (see pic at the attachment)
Sorry for my bad englisch ;)
Post a reply to this message
|
|