// A tiny flower vase, printed upside down. // Renders in 47 minutes, 35 seconds on my laptop with CGAL. br = 15; // bottom radius t = .8; // thickness epsilon = 0.01; h = 32; // height of inside //$fn=128; $fa = 1.5; // Max 240 segments in a "circle" when over 0.5mm $fs = 0.5; // Max 0.5mm segments when under 240 segments scale([1, 1.1, 1]) { difference() { union() { leg(); rotate([0, 0, 120]) leg(); rotate([0, 0, 240]) leg(); footcone(); // Conical bottom to avoid problems with porosity. // Note that translation here is in direction z, not perpendicular // to surface! This means the surface would be √2 thinner than t, // which could cause problems. translate([0, 0, 1.5 * t]) cylinder(r1=br, r2=0, h=br); } // The inside of the conical bottom. translate([0, 0, -epsilon]) cylinder(r1=br, r2=0, h=br); } // The more or less vertical part of the vase. translate([0, 0, -h+1.5*t+epsilon]) { difference() { union() { cylinder(r1=br*1.1, r2=br, h=h); // inner impermeable cone // outer decorative cone with tree cut into it. difference() { cylinder(r1=br*1.1+t/8, r2=br+t/16, h=h); // We scale the tree by 16× in the X dimension to "project" it onto the outer // layer. translate([br, 0, h]) rotate([0, 177, 0]) scale([16, 1, 1]) tree(scale=h/2); } } // The inside of the vase's vertical part. translate([0, 0, -epsilon]) cylinder(r1=br*1.1-t, r2=br-t-.707*t, h=h+2*epsilon); } } } module leg() { lr = 2.5; // disabled because it's ugly and because the foot cone should be fine //translate([br-lr, 0, 0]) cylinder(r=lr, h=br*1.1); } module footcone() { // Takes less plastic than legs and looks better. fh=br+3; // add enough extra so that the center cone doesn’t touch the bottom. translate([0, 0, -0]) difference() { // use a steeper slope than the bottom to reduce overhang problems // by using a nonzero r1 cylinder(r1=br/2, r2=br, h=fh); translate([0, 0, t*3]) cylinder(r1=br/2, r2=br, h=fh); } } // Fractal recursive tree. Three-dimensional. module tree(scale) { cylinder(r=scale/32, h=scale); if (scale > 1.0) { translate([0, 0, scale]) rotate([33, 0, 0]) tree(scale*.6); translate([0, 0, scale]) rotate([-10, 1, 0]) tree(scale/2); translate([0, 0, scale/4]) rotate([20, 3, 0]) tree(scale*.3); translate([0, 0, scale/2]) rotate([-23, 0, 0]) tree(scale*3/4); } }