// spider.scad $fn=40; // Sets the number of fragments for circles // Module for the spider's body module body(){ scale([1.2,1,0.8]) translate([0,6.5,2]) hull(){ translate([0,6,0]) sphere(3.5); translate([-1,0,0])sphere(3); translate([1,0,0])sphere(3); } } // Module for a large leg module ll(){ leg(10,0.8,1.1); translate([10.5,0,0]) rotate([0,0,-55]) leg(7,0.7,1); translate([17.7,-12.5,0]) rotate([0,0,-245]) leg(7,0.5,0.7); } // Module for a leg segment module leg(l,d1,d2){ rotate([0,90,0]){ cylinder (l,d1,d2); sphere(d1); translate([0,0,l])sphere(d2); } } // Module for right-hand side legs module rhs(){ rotate([0,0,-35])ll(); rotate([0,0,-10])ll(); rotate([0,0,12]) rotate([180,0,0])ll(); rotate([0,0,30]) rotate([180,0,0])ll(); } // Module for eight legs module eight(){ rhs(); mirror([1,0,0])rhs(); } // Module for the spider's head module head(){ scale([0.9,0.7,0.6]) translate([0,3,1]){ rotate([90,0,0]) cylinder(5,2.8,3); translate([0,-5,0]) sphere(3); sphere(2.8); translate([-.5,-9,-2]) rotate([-30,0,0])cylinder(3,0.5); translate([.5,-9,-2]) rotate([-30,0,0])cylinder(3,0.5); translate([0,-8,-1]) // small scale([0.2,0.12,.8]){ rotate([0,0,-45])ll(); mirror([1,0,0])rotate([0,0,-45])ll(); } } } // Module for the whole spider module spider(){ color("black")eight(); color("brown")head(); color("brown")body(); } // Intersection to flatten bottom for printing module flat(){ intersection(){ spider(); translate([-50,-50,0])cube (100); } } flat();