// A small habitat... or something like that... // ============================================ // Christoph Nieß, February 28, 2016, CC-BY-SA // Global Settings // --------------- radius = 50; // radius of the dome wire = 5; // diameter of the dome struts standoff = 5; // height of the flat area at the bottom quality_wire = 50; quality_earth = 500; // The dome is a half Pentakis Icosidodecahedron, so it has 40 faces, all of // which are triangles of two different kinds. // To have a go at building it it is derived from a Icosidodecahedron, of which // only the pentagons and the triangles inside them are drawn. // The aequatorial cut through an Icosidodecahedron is a regular Decagon, so we // can derive a lot of the geometry from that: // The circumradius of the decagon dives us the habitat radius for a given pentagon // edge length. We want it the other way round, though: pentagonEdge = radius * 2 * sin(18); // Each sectioned pentagon has one vertix in the middle and five around it // Those five will be placed by their angles from the middle point, referenced // to the middle of the dome pentagonOutAngle = asin(pentagonEdge/10*sqrt(50+10*sqrt(5))/radius); module pentagon() // Draws one of the base pentagons { union() { // first part draws the outside circumfence of the pentagon hull() { rotate([0,pentagonOutAngle,0]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([0,pentagonOutAngle,72]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([0,pentagonOutAngle,72]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([0,pentagonOutAngle,144]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([0,pentagonOutAngle,144]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([0,pentagonOutAngle,216]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([0,pentagonOutAngle,216]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([0,pentagonOutAngle,288]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([0,pentagonOutAngle,288]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([0,pentagonOutAngle,0]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } // second part draws the "spokes" hull() { rotate([0,pentagonOutAngle,0]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([0,pentagonOutAngle,72]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([0,pentagonOutAngle,144]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([0,pentagonOutAngle,216]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([0,pentagonOutAngle,288]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } } } module DomeSkirt() // Draws the upper circle of pentagons of the dome { union() { rotate([0,2 * pentagonOutAngle,0]) rotate([0,0,180]) pentagon(); rotate([0,2 * pentagonOutAngle,72]) rotate([0,0,180]) pentagon(); rotate([0,2 * pentagonOutAngle,144]) rotate([0,0,180]) pentagon(); rotate([0,2 * pentagonOutAngle,216]) rotate([0,0,180]) pentagon(); rotate([0,2 * pentagonOutAngle,288]) rotate([0,0,180]) pentagon(); } } module domeBuild() { union() { pentagon(); // top of dome DomeSkirt(); // sides of dome // add the missing bottom edges hull() { rotate([90,0,0]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([90,0,-36]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([90,0,-72]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([90,0,-108]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([90,0,-144]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([90,0,-180]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([90,0,-216]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([90,0,-252]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } hull() { rotate([90,0,-288]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); rotate([90,0,-324]) translate([0,0,radius]) sphere($fn=quality_wire, d=wire); } } } module house() // My home inside of the habitat. leave your shoes at the door, please! { union() { // a block...house! translate([0,0,radius/10]) cube([radius/2,radius/1.5, radius/5], center=true); translate([0,0,radius/5]) rotate([0,45,0]) cube([1.5*(radius/4),radius/1.5,1.5*(radius/4)], center=true); } } translate([0,0,radius + wire - standoff]) { union() { domeBuild(); house(); difference() { sphere($fn=quality_earth, r=radius+(wire/2)); translate([0,0,1.5*radius]) cube([3*radius,3*radius,3*radius], center=true); translate([0,0,-(2*radius + wire - standoff)]) cube([2*radius,2*radius,2*radius], center=true); } } }