1
0
mirror of https://github.com/revarbat/BOSL2.git synced 2025-01-30 13:23:03 +01:00
BOSL2/examples/fractal_tree.scad

18 lines
505 B
OpenSCAD
Raw Permalink Normal View History

include <BOSL2/std.scad>
module tree(l=1500, sc=0.7, depth=10)
recolor("lightgray")
2024-03-03 19:19:14 -08:00
cylinder(h=l, d1=l/5, d2=l/5*sc)
attach(TOP)
if (depth>0)
zrot(90)
zrot_copies(n=2)
yrot(30) tree(depth=depth-1, l=l*sc, sc=sc);
else
recolor("springgreen")
yscale(0.67)
teardrop(d=l*3, l=1, anchor=BOT, spin=90);
tree();
2019-04-16 19:16:50 -07:00
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap