From 92c57bd303d7a8299f7d30ed845185f121f58ef0 Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Mon, 4 Aug 2014 10:19:47 +0200 Subject: [PATCH] Finish the 3D model for the led cube --- doc/threedvis/src/threedvis/core.clj | 60 +- doc/threedvis/threedvis.scad | 1321 ++++++++++++++++++++++++++ 2 files changed, 1356 insertions(+), 25 deletions(-) create mode 100644 doc/threedvis/threedvis.scad diff --git a/doc/threedvis/src/threedvis/core.clj b/doc/threedvis/src/threedvis/core.clj index 7d9085d..49b7e4b 100644 --- a/doc/threedvis/src/threedvis/core.clj +++ b/doc/threedvis/src/threedvis/core.clj @@ -5,32 +5,42 @@ (defn print-scad [shape] (spit "threedvis.scad" (write-scad shape))) -(defn led [] - (union - (color [0.5 0.5 2] - (difference - (union - (cylinder 10 20) - (translate [0 0 10] (sphere 10)) - (translate [0 0 -8] (cylinder 13 4))) - (translate [0 13 -7] (cube 30 5 10)))) - (color [0.3 0.3 0.3] - (union - (translate [0 5 -30] (cylinder 1.5 50)) - (translate [7 5 -60] (rotate (/ pi 4) [0 -1 0] (cylinder 1.5 20)))) - (translate [14 5 -122] (cylinder 1.5 110)) - (union - (translate [0 -5 -10] (cylinder 1.5 15)) - (translate [0 -44 -17] (rotate (/ pi 2) [1 0 0] (cylinder 1.5 80))))))) +(defn led [edge] + (let [long-leg (cylinder 1.5 100)] + (union + (color [0.5 0.5 2] + (difference + (union + (cylinder 10 20) + (translate [0 0 10] (sphere 10)) + (translate [0 0 -8] (cylinder 13 4))) + (translate [0 13 -7] (cube 30 5 10)))) + (color [0.3 0.3 0.3] + (union + (translate [0 5 -30] (cylinder 1.5 50)) + (translate [7 5 -60] (rotate (/ pi 4) [0 -1 0] (cylinder 1.5 20)))) + (translate [14 5 -122] (cylinder 1.5 110)) + (rotate (/ pi 6) [0 1 0] (union + (translate [4 -5 -10] (cylinder 1.5 15)) + (if (not edge) (translate [4 -54 -17] (rotate (/ pi 2) [1 0 0] long-leg))))) + (if edge (translate [44 -4 -17] (rotate (/ pi 2) [0 1 0] long-leg))))))) -(defn one-pos [] +(defn one-pos [endpos] (union - (translate [0 0 0] (led)) - (translate [0 0 100] (led)) - (translate [0 0 200] (led)))) + (translate [0 0 0] (led endpos)) + (translate [0 0 100] (led endpos)) + (translate [0 0 200] (led endpos)))) + +(defn one-column [] + (union + (translate [0 0 0] (one-pos true)) + (translate [0 100 0] (one-pos false)) + (translate [0 200 0] (one-pos false)))) (print-scad - (union - (translate [0 0 0] (one-pos)) - (translate [0 100 0] (one-pos)) - (translate [0 200 0] (one-pos)))) + (translate [-100 -100 -100] + (union + (translate [0 0 0] (one-column)) + (translate [100 0 0] (one-column)) + (translate [200 0 0] (one-column)) + ))) diff --git a/doc/threedvis/threedvis.scad b/doc/threedvis/threedvis.scad new file mode 100644 index 0000000..7d72f52 --- /dev/null +++ b/doc/threedvis/threedvis.scad @@ -0,0 +1,1321 @@ +translate ([-100, -100, -100]) { + union () { + translate ([0, 0, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 100, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + } + } + translate ([0, 200, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + } + } + } + } + translate ([100, 0, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 100, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + } + } + translate ([0, 200, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + } + } + } + } + translate ([200, 0, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + } + } + translate ([44, -4, -17]) { + rotate (a=90.0, v=[0, 1, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 100, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + } + } + translate ([0, 200, 0]) { + union () { + translate ([0, 0, 0]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 100]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + translate ([0, 0, 200]) { + union () { + color ([0.5, 0.5, 2, ]) { + difference () { + union () { + cylinder (h=20, r=10, center=true); + translate ([0, 0, 10]) { + sphere (r=10, center=true); + } + translate ([0, 0, -8]) { + cylinder (h=4, r=13, center=true); + } + } + translate ([0, 13, -7]) { + cube ([30, 5, 10], center=true); + } + } + } + color ([0.3, 0.3, 0.3, ]) { + union () { + translate ([0, 5, -30]) { + cylinder (h=50, r=1.5, center=true); + } + translate ([7, 5, -60]) { + rotate (a=45.0, v=[0, -1, 0]) { + cylinder (h=20, r=1.5, center=true); + } + } + } + translate ([14, 5, -122]) { + cylinder (h=110, r=1.5, center=true); + } + rotate (a=29.999999999999996, v=[0, 1, 0]) { + union () { + translate ([4, -5, -10]) { + cylinder (h=15, r=1.5, center=true); + } + translate ([4, -54, -17]) { + rotate (a=90.0, v=[1, 0, 0]) { + cylinder (h=100, r=1.5, center=true); + } + } + } + } + } + } + } + } + } + } + } + } +}