OpenSCAD: Rekurze
OpenSCAD: Rekurze
module rec(r=5, h=20, s=0.75, a=30, n=5, level=5) {
if (level > 0) {
cylinder(r=r,h=h);
translate([0,0,h]) {
sphere(r=r);
for (i=[0:n-1])
rotate([a,0,i*(360/n-1)])
rec(r=r*s, h=h*s, s=s, a=a, n=n,
level=level-1);
}
}
}
rec(n=3);