Example: Build a tree of cylinders with depth 4 which leafs are spheres
set(s,{depth = 4:5;ELSE:ss}), set(o,{depth = 1:0;ELSE:1}), set(ss,s * 0.71), set(r,s / (PI * 4)), object(o,r,r,s,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80 + drand() * 4 - 2),deg(-25 + drand() * 4 - 2),deg(-20 + drand() * 4 - 2)), f(), turn(deg(10 + rand() * 4 - 2),deg(45 + drand() * 4 - 2),deg(50 + drand() * 4 - 2)), f()


Example: Build a tree of cylinders with depth 12 and a second tree which has only leafs of spheres
set(s,{depth = 12:1;ELSE:ss}), set(o,{depth = 1:0;ELSE:2}), set(ss,s * 0.71), set(r,s / (PI * 4)), object(o,r,r,s,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()
set(s,{depth = 12:1;ELSE:ss}), set(o,{depth = 1:1;ELSE:0}), set(ss,s * 0.71), set(r,s / (PI * 4)), object(o,r,r,s,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()


Example: Build a tree of cylinders with depth 10 and a second tree which has only leafs of spheres
set(s,{depth = 10:1;ELSE:ss}), set(o,{depth = 1:0;ELSE:2}), set(ss,s * 0.71), set(r,s / 6), object(o,r,r,s,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()
set(s,{depth = 10:1;ELSE:ss}), set(o,{depth = 1:1;ELSE:0}), set(ss,s * 0.71), object(o,s / 8,s,s * 4,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()


Example: Same as Example before but more leafs
set(s,{depth = 10:1;ELSE:ss}), set(o,{depth = 1:0;ELSE:2}), set(ss,s * 0.71), set(r,s / 6), object(o,r,r,s,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()
set(s,{depth = 10:1;ELSE:ss}), set(o,{depth < 5:1;ELSE:0}), set(os,{depth = 4:s * 0.71 * 0.71 * 0.71;depth = 3:s * 0.71 * 0.71;depth = 2:s * 0.71;ELSE:s}), set(ss,s * 0.71), object(o,os / 8,os,os * 4,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()


Example: Same as Example before but more leafs and depth 11
set(s,{depth = 11:1;ELSE:ss}), set(o,{depth = 1:0;ELSE:2}), set(ss,s * 0.71), set(r,s / 6), object(o,r,r,s,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()
set(s,{depth = 11:1;ELSE:ss}), set(o,{depth < 6:1;ELSE:0}), set(os,{depth = 5:s * 0.71 * 0.71 * 0.71 * 0.71;depth = 4:s * 0.71 * 0.71 * 0.71;depth = 3:s * 0.71 * 0.71;depth = 2:s * 0.71;ELSE:s}), set(ss,s * 0.71), object(o,os / 4,os * 2,os * 8,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()


Example: Same as Example before but again more leafs
set(s,{depth = 11:1;ELSE:ss}), set(o,{depth = 1:0;ELSE:2}), set(ss,s * 0.71), set(r,s / 6), object(o,r,r,s,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()
set(s,{depth = 11:1;ELSE:ss}), set(o,{depth < 7:1;ELSE:0}), set(os,{depth = 6:s * 0.71 * 0.71 * 0.71 * 0.71 * 0.71;depth = 5:s * 0.71 * 0.71 * 0.71 * 0.71;depth = 4:s * 0.71 * 0.71 * 0.71;depth = 3:s * 0.71 * 0.71;depth = 2:s * 0.71;ELSE:s}), set(ss,s * 0.71), object(o,os / 4,os * 2,os * 8,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f()


Example: Same as Example before but tree stems
set(s,{depth = 7:1;ELSE:ss}), set(ss,s * 0.71), set(r,s / 6), cyl(r,r,s,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f(), turn(deg(-60),deg(-25),deg(-20)), f()
set(s,{depth = 8:1;ELSE:ss}), set(o,{depth < 7:1;ELSE:0}), set(os,{depth = 6:s * 0.71 * 0.71 * 0.71 * 0.71 * 0.71;depth = 5:s * 0.71 * 0.71 * 0.71 * 0.71;depth = 4:s * 0.71 * 0.71 * 0.71;depth = 3:s * 0.71 * 0.71;depth = 2:s * 0.71;ELSE:s}), set(ss,s * 0.71), object(o,os / 16,os / 2,os * 2,0,deg(90),0,s / 2,0,0), go(s), turn(deg(80),deg(-25),deg(-20)), f(), turn(deg(10),deg(45),deg(50)), f(), turn(deg(-60),deg(-25),deg(-20)), f()


