// Conway's Century Puzzle module base(){ difference(){cube([60.4,50.4,4],center=true); translate([0,0,1]) cube([50.4,40.4,4],center=true); }} module twobytwo(){hull(){ translate ([0.6,0.6,0]) cylinder(h=3,r=0.5,center=false); translate ([0.6,19.4,0]) cylinder(h=3,r=0.5,center=false); translate ([19.4,0.6,0]) cylinder(h=3,r=0.5,center=false); translate ([19.4,19.4,0]) cylinder(h=3,r=0.5,center=false); }} module twobyone(){hull(){ translate ([0.6,0.6,0]) cylinder(h=3,r=0.5,center=false); translate ([0.6,19.4,0]) cylinder(h=3,r=0.5,center=false); translate ([9.4,0.6,0]) cylinder(h=3,r=0.5,center=false); translate ([9.4,19.4,0]) cylinder(h=3,r=0.5,center=false); }} module onebyone(){hull(){ translate ([0.6,0.6,0]) cylinder(h=3,r=0.5,center=false); translate ([0.6,9.4,0]) cylinder(h=3,r=0.5,center=false); translate ([9.4,0.6,0]) cylinder(h=3,r=0.5,center=false); translate ([9.4,9.4,0]) cylinder(h=3,r=0.5,center=false); }} module pieces(){twobytwo(); translate([25,0,0]) twobyone(); translate([-15,0,0]) twobyone(); translate([-30,0,0]) twobyone(); translate([30,25,0]) twobyone(); translate([-15,25,0]) twobyone(); translate([-30,25,0]) twobyone(); translate([0,25,0]) onebyone(); translate([15,25,0]) onebyone(); translate([0,40,0]) onebyone(); translate([15,40,0]) onebyone();} r0 = 3; r1 = 4; module circlet(x,y){difference(){ translate ([x,y,0]) cylinder(r=r1,h=1,center=true); translate ([x,y,0]) cylinder(r=r0,h=2,center=true);}} module link(x0,y0,x1,y1){ d = sqrt((x0-x1)*(x0-x1)+(y0-y1)*(y0-y1)); rad = (r1-r0)/2; gap = (r0+r1)/2; a0 = x0 + (x1-x0)*gap/d; b0 = y0 + (y1-y0)*gap/d; a1 = x1 - (x1-x0)*gap/d; b1 = y1 - (y1-y0)*gap/d; hull(){translate([a0,b0,0]) cylinder(rad,h,center=true); translate([a1,b1,0]) cylinder(rad,h,center=true);}} module links(){link(0,0,10,10); link(10,10,20,20); link(20,20,30,30); link(30,30,40,40); link(20,0,30,10); link(30,10,40,20); link(40,20,50,30);} module circlets(){ circlet(0,0); circlet(0,20); circlet(0,40); circlet(10,10); circlet(10,30); circlet(20,0); circlet(20,20); circlet(20,40); circlet(30,10); circlet(30,30); circlet(40,0); circlet(40,20); circlet(40,40); circlet(50,10); circlet(50,30);} module letterYZ(){ hull(){ translate([29.5,35,0]) cylinder(r=3,h=1,center=true); translate([47.5,5,0]) cylinder(r=3,h=1,center=true);} hull(){ translate([38.5,20,0]) cylinder(r=3,h=1,center=true); translate([47.5,35,0]) cylinder(r=3,h=1,center=true);} hull(){ translate([2.5,35,0]) cylinder(r=3,h=1,center=true); translate([20.5,35,0]) cylinder(r=3,h=1,center=true);} hull(){ translate([2.5,35,0]) cylinder(r=3,h=1,center=true); translate([20.5,5,0]) cylinder(r=3,h=1,center=true);} hull(){ translate([2.5,5,0]) cylinder(r=3,h=1,center=true); translate([20.5,5,0]) cylinder(r=3,h=1,center=true);} link(10,10,20,20); link(20,20,30,10); link(30,10,40,20);} module edge(){difference(){ translate([25,20,2]) cube([60.4,52.6,5],center=true); translate([25,20,2]) cube([50+2*r0,40+2*r0,6],center=true); translate([25,20,3]) cube([62.4,50.6,5],center=true);}} module topYZ(){circlets(); letterYZ(); edge();} module top(){circlets(); edge(); link(20,0,10,10); link(10,10,20,20); link(20,20,10,30); link(10,30,20,40); link(40,0,30,10); link(30,10,40,20); link(40,20,30,30); link(30,30,40,40);} //pieces(); //use 90% fill //base(); top(); //edge();