$fn=32; m = 3; n = 2; thickness = 1.3; nodeSize = 2; width=15; angle_factor = 0.7; length_factor = 0.6; // skip_first_branch: do not draw the first branch for top, bottom, or none module level(number= 3 *m*n, angle=70, width=20, length=10, skip_first_branch="none") { step_n = width/n; step_m = width/m; // top for(k=[0:number/n-1]){ translate([k*n*step_n,0,0]){ // tree and balls for(i=[0:n-1]){ if(skip_first_branch == "top" && i==0) {} else{ translate([i*step_n,0,0]) rotate(a=[-90+(180-angle)/2+i/(n-1)*angle,0,0]){ cylinder(length, d=thickness); // m balls at the top if(k