Sunday, March 30, 2014

Day 216 - Tiling space with a weird squiggle

I've been having fun watching the math that Mike Lawler (@mikeandallie on Twitter) and his kids discuss on video at their blog mikesmathpage, and thinking about how to get my own 8-year-old son interested in watching those videos. Their post from yesterday, Penrose tiles and some simple 3D variations, has three great videos that are very visual and so I started with those. In these videos Mike and his kids examine various tilings of 2-dimensional space and various tessellations of 3D-space, using the following models:
Much thanks to Mike and his kids for making their mathematical journey available for others to learn from, and also for using our models as part of their explorations!

In the second video, Mike and his kids show that two very odd shapes can be used to fill 3-space because pairs of them can combine to make a cube, which of course fills space. In their third video they use 3D-printed models and ZomeTools to show that Rhombic Dodecahedra also fill space. The following model combines these two ideas, using four copies of an even stranger object to construct a Rhombic Dodeahedron:
And that's the weird squiggle that we'll be filling space with today:



Settings: Printed on a Replicator 2 with raft but no supports, on a glass platform with blue painter's tape, at 80% scale, with two pieces of each color. On .3mm/low the pieces took about 12 minutes each to print and made a model was very tight and difficult to assemble, and nearly impossible to take apart. On .2mm/low the pieces took about 16 minutes each to print and have the same problem. Hopefully the clearance will loosen up with repeated use, but if not then I will try to figure out the OpenSCAD code that made this model so that I can increase the clearance.

Technical notes, OpenSCAD flavor: VeryWetPaint made their code available and I'm going to attempt to annotate it to make clear how it works. To understand this code you'll need to learn about Minkowski sums and .dxf extrusion in OpenSCAD.  Here are some things I don't understand yet about this code: (1) why does it seem like the two helical pieces that are removed in the "difference" operation are so different, and (2) how was the .dxf file made and what is the equation for whatever that helix is? I'll update later if I figure it out; please comment below if you know!

// mathgrrl annotation of rhombic puzzle piece code
// code by VeryWetPaint on Thingiverse
// http://www.thingiverse.com/thing:12489

/////////////////////////////////////////////////////////
// parameters ///////////////////////////////////////////

sz=30;
sa=sz*1.5;
tw = 240;

/////////////////////////////////////////////////////////
// module for making a rhombic dodecahedron /////////////

// here VeryWetPaint has the elegant idea to contruct the 
// Rhombic Dodecahedron by intersecting six rectangular solids 

module rhomb()
{
minkowski()
{
  // take six rectangular solids and intersect them
intersection()
  {
rotate([45,0,0]) cube(size=[sa,sz,sz],center=true );
rotate([-45,0,0]) cube(size=[sa,sz,sz],center=true );

rotate([0,45,0]) cube(size=[sz,sa,sz],center=true );
rotate([0,-45,0]) cube(size=[sz,sa,sz],center=true );

rotate([0,0,45]) cube(size=[sz,sz,sa],center=true );
rotate([0,0,-45]) cube(size=[sz,sz,sa],center=true );
   }

// this sphere rounds all of the edges with Minkowski sum
  sphere(r=2,$fn=16);
}
}

/////////////////////////////////////////////////////////
// render of twisty piece ///////////////////////////////

// here VeryWetPaint takes away two corkscrew pieces from the 
// Rhombic Dodecahedron, leaving one corkscrew piece behind

difference()
{
// start with the Rhombic Dodecahedron
rotate([0,0,45]) rhomb();

// take away one corkscrew piece
linear_extrude( 
file="spiral.dxf", 
height=36*1.7320508075688772935274463415059, 
center=true, 
origin=[28.782,28.43], 
twist=tw, 
slices=64 );

// take away a rotation of that same corkscrew piece
 rotate([0,0,120/4]) 
linear_extrude( 
file="spiral.dxf", 
height=36*1.7320508075688772935274463415059, 
center=true, 
origin=[28.782,28.43], 
twist=tw, 
slices=64 );
}

UPDATE: Scott Elliott (VeryWetPaint) has uploaded a new .dxf file and OpenSCAD code on Thingiverse with some helpful descriptions and bonus OpenSCAD code in the comments below. Thank you, VeryWetPaint!