Welcome to MakerHome

We've completed our yearlong print-a-day project! New projects will be posted at www.mathgrrl.com/hacktastic.

All mathgrrl designs and associated images and files on MakerHome are licensed under the Creative Commons Attribution Non-Commercial Share Alike license. If you want to use designs, images, or files outside of the terms of this license, please email request@mathgrrl.com.

Monday, December 16, 2013

Day 112 - Tetris T's

I like the rounded and nicely-spaced design of 3DAndy's Pentominos on Thingiverse, but wanted to print some tetrominos instead, for math/puzzles (for example, polyomino packing problems) and for future Tetris-related art projects.  Since 3DAndy was nice enough to post his OpenSCAD code, it was easy to modify his pentomino-T into a tetromino-T.


STL file: http://www.geekhaus.com/makerhome/day112_tetrisT.stl
Thingiverse link: http://www.thingiverse.com/thing:212995

Settings: MakerWare .3mm/low, with 8 T's printing in 45 minutes and weighing only 16 grams. Tetris pieces is a great "stash-busting project" for those of you with lots of little scraps of filament that are too small for any normal print job.

Technical notes: Download the OpenSCAD code here or cut and paste from the below.

// mathgrrl tetrominos - example with Tetris "T"
// based directly on 3DAndy's pentominos

////////////////////////////////////////////////////////////
// PARAMETERS ////////////////////////////////////////////////////////////

//resolution
$fn=32;

//dimensions
length = 10;
radius = 1;
space = 0.2;

///////////////////////////////////////////////////////////////
// RENDERS ///////////////////////////////////////////////////////////////

//render an instance of the Tetris "T"
tetromino_T();

///////////////////////////////////////////////////////////////
// MODULES ///////////////////////////////////////////////////////////////

//define the blocks and connectors that make the Tetris "T"
module tetromino_T() {
union() {
// the blocks
translate([0,0,0]) 
myCube();
translate([length,0,0]) 
myCube();
translate([2*length,0,0]) 
myCube();
translate([length,length,0]) 
myCube();
// the connectors
translate([(0.5)*length,0,0]) 
myConnect();
translate([(1.5)*length,0,0]) 
myConnect();
translate([length,(0.5)*length,0]) 
myConnect();
}
}

//module for making the blocks
//eight spheres translated to the corners of the desired cube
//then convex hull of those spheres makes a rounded cube
module myCube() {
dist = length/2-radius-space;
hull() {
translate([dist,dist,dist]) 
sphere(r=radius);
translate([-dist,dist,dist]) 
sphere(r=radius);
translate([dist,-dist,dist])
sphere(r=radius);
translate([-dist,-dist,dist]) 
sphere(r=radius);
translate([dist,dist,-dist])
sphere(r=radius);
translate([-dist,dist,-dist]) 
sphere(r=radius);
translate([dist,-dist,-dist]) 
sphere(r=radius);
translate([-dist,-dist,-dist]) 
sphere(r=radius);
}
}

//smaller cubes used to connect adjacent blocks
//space between blocks is small enough that no support is needed to bridge the gap
//even though these hang in the air between the blocks they connect
module myConnect() {
translate([space+radius-length/2,space+radius-length/2,space+radius-length/2]) 
cube([length-2*space-2*radius,length-2*space-2*radius,length-2*space-2*radius]);
}