From: daniel watson Date: Thu, 17 May 2018 00:54:38 +0000 (-0700) Subject: add erin's puzzle and its solution X-Git-Url: http://challenge-bot.com/repos/?p=ozzloy%40gmail.com%2F3d-printables;a=commitdiff_plain;h=271bfd5f3af091875c89ea7f656874163ceff016 add erin's puzzle and its solution --- diff --git a/.gitignore b/.gitignore index 33ff863..826fc79 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.gcode *.stl *.amf +*.html diff --git a/erin/puzzle.org b/erin/puzzle.org new file mode 100644 index 0000000..a5e9d91 --- /dev/null +++ b/erin/puzzle.org @@ -0,0 +1,16 @@ +* here's a solved puzzle + [[./solved-puzzle.png]] +* here are the steps to solving it +** step 0, bottom, south, west pieces + [[./step_0_a.png]] + [[./step_0_b.png]] + get 3 pieces arranged as in these pictures. +** step 1, add in east piece + [[./step_1_a.png]] + [[./step_1_b.png]] +** step 2, add in north piece + [[./step_2_a.png]] + [[./step_2_b.png]] +** step 3, add in top piece + [[./step_3_a.png]] + [[./step_3_b.png]] diff --git a/erin/puzzle.scad b/erin/puzzle.scad new file mode 100644 index 0000000..937df00 --- /dev/null +++ b/erin/puzzle.scad @@ -0,0 +1,159 @@ +$fn = 100; + +h = 10; + +module pyramid() { +polyhedron( + points=[ + [h,h,0], [h,-h,0], [-h,-h,0], [-h,h,0], [0,0,h] + ], + faces = [ + [1,4,0], [2,4,1], [2,3,4], [4,3,0], + [0,3,2,1] + ] +); +} + +module quarter_pyramid() { + difference() { + pyramid(); + rotate([0,0,45]) translate([-2*h, 0, -h]) cube([h*4,h*4,h*4]); + rotate([0,0,-45]) translate([-2*h, -4*h, -h]) cube([h*4,h*4,h*4]); + rotate([0,0,-45]) translate([0, -4*h, -h]) cube([h*4,h*4,h*4]); + } +//polyhedron( +// points=[ +// [0,0,0], [h,h,0], [h,-h,0], [0,0,h] +// ], +// faces = [ +// [1,2,3], [3,1,0], +// ] +//); +} + +//quarter_pyramid(); + +module bottom() { + children(); +} + +module top() { + translate([0,0,2*h]) rotate([180,0,0]) + children(); +} + +module north() { + translate([0,h,h]) rotate([90,90,0]) + children(); +} + +module south() { + rotate([0,0,180]) north() + children(); +} + +module east() { + translate([h,0,h]) rotate([90,0,0]) rotate([0,-90,0]) + children(); +} + +module west() { + rotate([0,0,180]) east() + children(); +} + +module pointy() { + translate([0,0,-2*h]) top() pyramid(); +} + + +module partA() { + translate([0,-h,-h]) rotate([180,-90,90]) quarter_pyramid(); +} + + +module partB() { + translate([0,-h,-h]) rotate([180,-90,-90]) quarter_pyramid(); +} + +//top() pyramid(); +//top() pointy(); +//top() partA(); +//top() partB(); +//top() partC(); +//top() partD(); +//top() partE(); + +//south() pyramid(); +//south() pointy(); +//south() partA(); +//south() partB(); +//south() partC(); +//south() partD(); +//south() partE(); + +//north() pyramid(); +//north() pointy(); +//north() partA(); +//north() partB(); +//north() partC(); +//north() partD(); +//north() partE(); + +//west() pyramid(); +//west() pointy(); +//west() partA(); +//west() partB(); +//west() partC(); +//west() partD(); +//west() partE(); + +//east() pyramid(); +//east() pointy(); +//east() partA(); +//east() partB(); +//east() partC(); +//east() partD(); +//east() partE(); + +module partC() { + translate([-h,h,-h]) rotate([0,180,90]) { + partA(); partB(); + } +} + + +//bottom() pyramid(); +//bottom() pointy(); +//bottom() partA(); +//bottom() partB(); +//bottom() partC(); +//bottom() partD(); +//bottom() partE(); + +module partD() { + translate([0,h,-h]) rotate([90, 0, 0]) partC(); +} + +module partE() { + rotate([0,0,180]) partD(); +} + +module puzzle_piece() { + pyramid(); + pointy(); + partA(); + partB(); + partC(); + partD(); + partE(); +} + +rotate([0,45,0]) puzzle_piece(); + +//bottom() puzzle_piece(); +//top() puzzle_piece(); +//north() puzzle_piece(); +//south() puzzle_piece(); +//east() puzzle_piece(); +//west() puzzle_piece(); diff --git a/erin/solved-puzzle.png b/erin/solved-puzzle.png new file mode 100644 index 0000000..cc8bf27 Binary files /dev/null and b/erin/solved-puzzle.png differ diff --git a/erin/step_0_a.png b/erin/step_0_a.png new file mode 100644 index 0000000..dbe29d7 Binary files /dev/null and b/erin/step_0_a.png differ diff --git a/erin/step_0_b.png b/erin/step_0_b.png new file mode 100644 index 0000000..fbc195b Binary files /dev/null and b/erin/step_0_b.png differ diff --git a/erin/step_1_a.png b/erin/step_1_a.png new file mode 100644 index 0000000..68d06dd Binary files /dev/null and b/erin/step_1_a.png differ diff --git a/erin/step_1_b.png b/erin/step_1_b.png new file mode 100644 index 0000000..20bccd7 Binary files /dev/null and b/erin/step_1_b.png differ diff --git a/erin/step_2_a.png b/erin/step_2_a.png new file mode 100644 index 0000000..9bd4905 Binary files /dev/null and b/erin/step_2_a.png differ diff --git a/erin/step_2_b.png b/erin/step_2_b.png new file mode 100644 index 0000000..48127ce Binary files /dev/null and b/erin/step_2_b.png differ diff --git a/erin/step_3_a.png b/erin/step_3_a.png new file mode 100644 index 0000000..f9d7d76 Binary files /dev/null and b/erin/step_3_a.png differ diff --git a/erin/step_3_b.png b/erin/step_3_b.png new file mode 100644 index 0000000..ebbe1f7 Binary files /dev/null and b/erin/step_3_b.png differ