|
![](/i/fill.gif) |
Wasn't it Ryan Mooney who wrote:
>#macro Rec (current) //define macro
>
>sphere { <0,0,0>, 0.75 pigment {rgb
>0.5} //macro component
>translate <0,current*0.125,0>
>//squash by 0.125
>rotate 55*current*z //wrap the
>compact line into spiral
> }
>
>#if(current < Max-1) //if current
>< max recursion
>Rec(current+1) //recursion and
>increment
>#end //if
>
>#end //mcro
>
>Ryan Mooney wrote:
>
>> new to macro, having problems... =[
>> simple macro to make a spiral out of
>> spheres...
>> It does not want to go above 98 max.
>> recursive level...
>> Why... ??
That's the limit of recursive macros. You'll have to use a loop instead
of recursion if you want to go further. Something like this:-
#macro Rec (Max)// Parameter is now the number of spheres required
#local current=0;
#while (current < Max-1)
sphere { <0,0,0>, 0.75 pigment {rgb 0.5}
translate <0,current*0.125,0>
rotate 55*current*z
}
#declare current = current+1;
#end //while
#end //macro
Rec(300)
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |