Welcome to MakerHome




We've completed our yearlong print-a-day project!
All new material is now at Hacktastic: www.mathgrrl.com


Saturday, May 10, 2014

Day 257 - Saturday Guest: Scott Sherman's Isohedra

Today's post is contributed by Scott Sherman, otherwise known as loki3 on Shapeways, where he has a wide variety of exotic dice models, including a new kind of d4 and even a d5. You can read more about these models at his Fair Dice page. Since fair dice must have an equal probability of rolling any of their numbers, the topic of dice leads naturally into one about isohedra, polyhedra that have all faces the same and all faces in the same transitive relationship with each other. For example, every Catalan solid (see Day 212) is an isohedron. Welcome, Scott Sherman, isohedron master!

For most people, “dice” = the numbers 1 through 6 on a cube.  The first time I saw any other type of dice was the Platonic solids used by Dungeons and Dragons, with 4, 6, 8, 12 and 20 sides. Then, years later, I saw that D&D added a 10-sided die. 10 sides? That’s not a Platonic solid. Where did that come from? Are there other shapes that could be used for dice?

It turns out there’s a class of polyhedra known as “isohedra” that make fair dice. In an isohedron, every face has the same relationship to every other face, so there’s an equal chance of rolling any side. There are 30 classes of isohedra, which you can see by visiting Mathworld’s page on isohedra:


Those pictures are intriguing, but how would one go about creating an “octahedral pentagonal dodecahedron” if one were so inclined? Unfortunately, Mathworld doesn’t have much to say about many of those shapes. And, it turned out at the time I was looking into it, Google didn’t have much more to say on the subject.

So I set out to reverse engineer those polyhedra based on a few pictures. Many of them turned out to be far more interesting than I was expecting. Several turned out to be infinite families of polyhedra rather than just a single shape. I describe how you can construct many of these on my Isohedral Transforms page, but it’s more fun to simply play with them interactively on my Interactive Isohedra page.

Here’s one to try: On the Interactive Isohedra page, choose octahedral symmetry (the second option under Symmetry) and then select the button for pentagonal faces. In the graph in the lower left, click on "24y" and keep the mouse button pressed (or keep your finger on your tablet) and move around a little bit. You should see the shape morph into different isohedra that share the same overall symmetry. Here are some of the possibilities.



What I found interesting when I first played with that symmetry group was that it looked like I could create faces with bilateral symmetry, but it didn’t match any polyhedron I had seen before. If you pick right around x=0.43, y=0.25, you’ll see this shape. 

I call it the Bilateral Pentagonal Icositetrahedron. Pretty catchy, eh? Yeah, I’m thinking of a career in marketing. Here it is printed in Matte Bronze Steel from Shapeways:


Technical notes, OpenSCAD flavor: If you want to try modeling a Bilateral Pentagonal Icositetrahedron in OpenSCAD, use this script, which describes each of the vertices of the Bilateral Pentagonal Icositetrahedron and then lists the quintuples in which they should be made into pentagon faces to build the polyhedron:

points = [
 [0.5698403, 0.4301597, -0.2451223],
 [0.4301597, 0.5698403, 0.2451223],
 [0.4576581, 0.4576581, 0.4576581],
 [0.5698403, 0.2451223, 0.4301597],
 [0.7548777, 0, 0],
 [-0.2451223, 0.5698403, 0.4301597],
 [0.2451223, 0.4301597, 0.5698403],
 [0, 0.7548777, 0],
 [0.4301597, -0.2451223, 0.5698403],
 [0, 0, 0.7548777],
 [0.5698403, -0.2451223, -0.4301597],
 [0.4301597, 0.2451223, -0.5698403],
 [0.4576581, 0.4576581, -0.4576581],
 [-0.2451223, 0.4301597, -0.5698403],
 [0.2451223, 0.5698403, -0.4301597],
 [0, 0, -0.7548777],
 [-0.5698403, 0.4301597, 0.2451223],
 [-0.4301597, 0.5698403, -0.2451223],
 [-0.4576581, 0.4576581, -0.4576581],
 [-0.5698403, 0.2451223, -0.4301597],
 [-0.7548777, 0, 0],
 [-0.4301597, -0.2451223, -0.5698403],
 [-0.5698403, -0.2451223, 0.4301597],
 [-0.4301597, 0.2451223, 0.5698403],
 [-0.4576581, 0.4576581, 0.4576581],
 [-0.5698403, -0.4301597, -0.2451223],
 [-0.4301597, -0.5698403, 0.2451223],
 [-0.4576581, -0.4576581, 0.4576581],
 [0.2451223, -0.5698403, 0.4301597],
 [-0.2451223, -0.4301597, 0.5698403],
 [0, -0.7548777, 0],
 [-0.4576581, -0.4576581, -0.4576581],
 [0.2451223, -0.4301597, -0.5698403],
 [-0.2451223, -0.5698403, -0.4301597],
 [0.5698403, -0.4301597, 0.2451223],
 [0.4301597, -0.5698403, -0.2451223],
 [0.4576581, -0.4576581, -0.4576581],
 [0.4576581, -0.4576581, 0.4576581]
];
faces = [
 [0, 1, 2, 3, 4 ],
 [5, 6, 2, 1, 7 ],
 [8, 3, 2, 6, 9 ],
 [10, 11, 12, 0, 4 ],
 [13, 14, 12, 11, 15 ],
 [1, 0, 12, 14, 7 ],
 [16, 17, 18, 19, 20 ],
 [14, 13, 18, 17, 7 ],
 [21, 19, 18, 13, 15 ],
 [22, 23, 24, 16, 20 ],
 [6, 5, 24, 23, 9 ],
 [17, 16, 24, 5, 7 ],
 [25, 26, 27, 22, 20 ],
 [28, 29, 27, 26, 30 ],
 [23, 22, 27, 29, 9 ],
 [19, 21, 31, 25, 20 ],
 [32, 33, 31, 21, 15 ],
 [26, 25, 31, 33, 30 ],
 [34, 35, 36, 10, 4 ],
 [33, 32, 36, 35, 30 ],
 [11, 10, 36, 32, 15 ],
 [3, 8, 37, 34, 4 ],
 [29, 28, 37, 8, 9 ],
 [35, 34, 37, 28, 30 ]
];
polyhedron(points,faces);

Technical notes, nomenclature flavor (from mathgrrl):  A polyhedron is an isohedra if all of its faces are the same irregular polygon, and in addition the solid is "face-transitive", meaning that for any two faces on the polyhedron there is some rotation/reflection combination of the entire polyhedron that will take one face to the other. Catalan solids are all isohedra, but have an additional property: they are the duals of the Archimedian solids. This means that their duals have faces that are all regular polyhedra, which in turn means that every vertex of a Catalan solid has edges coming into it in evenly-distributed angles, like the evenly spaced spokes of a wheel. The duals of isohedra are polyhedra with combinations of regular and/or irregular polyhedron faces, and therefore the vertices of an isohedra can sometimes have incident edges that are irregularly spaced around the vertex. For example, the Bilateral Pentagonal Icositetrahedron above has some degree three vertices that have a "Y" shape instead of edges that divide the space around the vertices into thirds.

Friday, May 9, 2014

Day 256 - Friday Fail: Fixed-by-Tinkercad edition

Today we look at two objects that I had trouble printing on a Replicator 2 without doing some fixes. Usually when a model won't slice with MakerWare, I use MeshLab or TopMod to find and fix the problem. Sometimes this works and sometimes it doesn't. Today it didn't, and Tinkercad had to come to the rescue.

The first model we had a problem with was a lovely Bilateral Pentagonal Icositetrahedron sent to us by Scott Sherman (loki3 on Shapeways), who we met at G4G11. The model is great and even the idea of this isohedron is amazing, but its vertices were "mothy" (thanks M. for that word) and the model fell apart at the corners while I was trying to remove the supports.


These print fine on Shapeways (they are available in loki3's store), but with MakerWare something was going wrong. My guess is that there are just too many triangles at the corners where spheres were added to round out the connections between cylinders; or perhaps the meshes of the sphere vertices just weren't playing well with the meshes of the cylinder edges. When you open the file in MeshLab you can see the suspicious-looking vertex meshes:


I don't know how to fix this problem in MeshLab, and wasn't getting anywhere with TopMod either, so it was time for a Hail Mary pass to Tinkercad. Since Tinkercad can get slow with meshes that have too many triangles, I did a couple rounds of Quadratic Edge Collapse Decimation (a great future band name; also see Day 134) to the model first to reduce the number of triangles, and then imported the resulting lower-poly model to Tinkercad. It turns out that Tinkercad seems to reinterpret whatever mesh you give it; my guess is that this is something to do with keeping complexity low so its servers don't get overloaded. Or maybe it is due to Tinkercad trying to make hollow or open models into solid, closed models. Or maybe it is something else entirely, but in any case, sometimes importing an STL file to Tinkercad works fine, and sometimes it causes a problem (for example, with Mathematica-exported knots like the one in Day 11), and every once in a while it fixes a problem. This time was one of those whiles; after going through Tinkercad and back out again, this is what the mesh looked like in MeshLab:


At first glance this does not seem to be an improvement of the mesh, but it turns out that this model prints just fine, with sturdy vertices (that's another great band name right there). Below is a picture of how it came out; compare this model with the Pentagonal Icositetrahedron we printed on Day 197. And stay tuned for tomorrow's guest post about this and other isohedra from Scott Sherman!


The second model we had a problem with today was a Great Rhombic Tricontahedron model from Chris Wallace (kitwallace on Thingiverse), generated from his incredible Polyhedra Index that can produce OpenSCAD code for generating every polyhedra that anyone has ever heard of, ever. This particular polyhedron is the basis for the Frabjous puzzle that we discussed on Day 252, and it is a strange, self-intersecting beast. Apparently this was reflected in its mesh as well, because I could not seem to get MakerWare to slice it in a sensible way; it was as if parts of the model that needed support were invisible to MakerWare, and support would not be built to them. In addition everything was taking forever because the inside of the model (which nobody would see after being printed) was very intricate. A couple of Quadratic Edge Decimations in MeshLab allowed me to import the STL into Tinkercad, which apparently simplified the model enough to print. Except for one problem, which you can see here:


Well, you would be able to see it if I could photograph the translucent filament better. What you're seeing is the bottom of the model, where five points meet the build plate. In each case at least one of the points dislodged itself from the raft before things could get properly connected up. The model was just too pointy; or perhaps alternately, not all five of the corners were equally flush with the build plate, and so one or more of them was actually printing a layer or two in the air. Either way, the problem could be fixed with another hack in Tinkercad. After exporting from MakerWare (to preserve the five-points-down orientation), and then importing into Tinkercad, we grouped a large cubical hole with the bottom of the model to cut off the tips of the five points at the base. With these flatter points the model was able to print successfully:


Thursday, May 8, 2014

Day 255 - Sofabed and office chairs

Here's a secret: I might be a little bit obsessive. With the 3D printing. Of all the tiny furniture. I'm just saying, I think this might not be normal. But we press on...

Although we have to give away a lot of our current furniture to fit into our Brooklyn apartment, there is one important piece we actually have to acquire: a sofabed, for people who come to visit. The green sofabed design in the picture below has a panel that indicates the size of the bed when it is extended. The model is based on IKEA's Karlstad sofabed. We also updated our chair module to make rudimentary office chairs. This is a picture of our future office/guestroom:


Thingiverse link: http://www.thingiverse.com/make:77566

Settings: MakerBot Replicator 2 on .3mm/low with no raft and no supports.

Technical notes, OpenSCAD flavor: The sofabed module is just a simple modification of the sofa module from Day 248.

/////////////////////////////////////////////////////////////
// module for making sofa beds //////////////////////////////

module sofabed(depth1,depth2,length,height){
scale(s)
union(){
// back of sofa
cuboid(depth1/4,length,height,soft);
// left arm of sofa
cuboid(depth1,depth1/4,height*.6,soft);
// right arm of sofa
translate([0,length-depth1/4,0]) cuboid(depth1,depth1/4,height*.6,soft);
// cushions of sofa
cuboid(depth1,length,height*.4,soft);
// image of bed
cuboid(depth2,length,height*.1,soft);
}
}

The office chairs are a new option for the chair module from Day 253. We made a toggle so you can choose shape=straight or shape=roll. With roll the back and seat of the chair get softer corners, and the base is replaced by a cylinder meant to represent the rolly wheels on an office chair. The base is connected with a rectangle instead of a post so that the model can print on its side without any supports. It looks kind of like a dentist's or hairdresser's chair so if you're designing a dentist's office or hair salon, this model is for you.

/////////////////////////////////////////////////////////////
// module for chairs ////////////////////////////////////////

module chair(depth,length,height,shape){
scale(s)
union(){
// top of chair
if (shape=="straight")
translate([0,0,height*.4]) 
cuboid(depth,length,height*.1,sharp);
if (shape=="roll")
translate([0,0,height*.4]) 
cuboid(depth,length,height*.1,soft);
// back
if (shape=="straight")
cuboid(depth*.15,length,height,sharp);
if (shape=="roll")
translate([0,0,height*.4]) 
cuboid(depth*.15,length,height*.6,soft);
// front
if (shape=="straight")
translate([depth*.85,0,0]) 
cuboid(depth*.15,length,height*.5,sharp);
if (shape=="roll")
union(){
translate([depth*.85/2,0,0]) 
cuboid(depth*.15,length,height*.45,sharp);
translate([depth/2,length/2,0]) 
cylinder(r=length/2,h=height*.1);
}
}
}

Wednesday, May 7, 2014

Day 254 - Arcade machine and light tree

We are going to leave a lot of furniture behind in the upcoming downsizing move, but there are two pieces we absolutely cannot live without: our full-size Galaga/Ms.PacMan arcade cabinet and our light-up Vegas tree (which we got after lusting after similar trees at the Golden Nugget). Here's the 1:50 scale mockup of where they will live in the new apartment:


In real life they currently look like this:


Sadly, notice the absence of the piano in the apartment mockup. The role of piano will instead be played by a small, silent desk. We've also sold our drum set. Too loud, takes up too much space.  :(

Thingiverse link: COMING SOON

Settings: Replicator 2 on .3mm/low, as usual.

Technical notes, OpenSCAD flavor: Again starting from the parameters and cuboid module from Day 248, the arcade machine is just a cuboid with part of a cylinder taken out of it. We're not really going for realism here, just rough abstract representations. It's interesting to see how simple you can make an object and have it still be recognizable.

/////////////////////////////////////////////////////////////
// module for arcade machine ////////////////////////////////

module arcade(depth,length,height){
scale(s)
difference(){
// overall size of the machine
cuboid(depth,length,height,sharp);
// cutout for screen and controls
translate([depth*.9,length*.9,height*.7]) 
rotate(90,[1,0,0]) 
cylinder(r=height*.25,h=length*.8);
}
}

The light tree is a total hack. We thought about using the new Customizable Tree on Thingiverse, but we didn't need that much customization and complexity and we wanted to keep all our designs in one simple OpenSCAD document, so we just stuck some angled cylinders to a post to make an abstract tree shape.

/////////////////////////////////////////////////////////////
// module for trees /////////////////////////////////////////

module tree(radius,height){
scale(s)
union(){
// branches
translate([0,0,height*.5]) 
rotate(40,[1,0,0]) 
cylinder(r=radius*.2,h=height*.5);
translate([0,0,height*.5]) 
rotate(200,[0,0,1]) rotate(40,[1,0,0]) 
cylinder(r=radius*.2,h=height*.5);
translate([0,0,height*.4]) 
rotate(80,[0,0,1]) rotate(50,[1,0,0]) 
cylinder(r=radius*.2,h=height*.3);
translate([0,0,height*.6]) 
rotate(140,[0,0,1]) rotate(405,[1,0,0]) 
cylinder(r=radius*.2,h=height*.3);
translate([0,0,height*.45]) 
rotate(260,[0,0,1]) rotate(50,[1,0,0]) 
cylinder(r=radius*.2,h=height*.3);
translate([0,0,height*.8]) 
rotate(100,[0,0,1]) rotate(30,[1,0,0]) 
cylinder(r=radius*.2,h=height*.2);
translate([0,0,height*.7]) 
rotate(280,[0,0,1]) rotate(30,[1,0,0]) 
cylinder(r=radius*.2,h=height*.3);
// leg
cylinder(r=radius*.2,h=height*.8);
// base
cylinder(r=radius*.8,h=height*.1);
}
}

Tuesday, May 6, 2014

Day 253 - Dining chairs and kitchen stool

Continuing our 1:50 scale miniature furniture collection, today we added dining room chairs and four-legged stools.  The picture below shows what the dining area will look like in our new apartment.


Thingiverse link: COMING SOON with full customizable set when we're done.

Settings: Printed on a MakerBot Replicator 2 with .3mm/low resolution, no raft and no support.

Technical notes, OpenSCAD flavor: The code for these models starts with the parameters and cubiod module from Day 248, with the following code for the simple module that builds the chairs.  In this design I assume that the seat is always just under halfway the full height of the chair.  The model outputs upright chairs, so before printing you should lie them on their sides to eliminate the need for supports.

/////////////////////////////////////////////////////////////
// module for chairs ////////////////////////////////////////

module chair(depth,length,height){
scale(s)
union(){
// top of chair
translate([0,0,height*.4]) 
      cuboid(depth,length,height*.1,sharp);
// back
cuboid(depth*.15,length,height,sharp);
// front
translate([depth*.85,0,0]) 
      cuboid(depth*.15,length,height*.5,sharp);
}
}

The module for the stools makes a round top and four cylindrical legs. The legs have to be much wider than they would be in real life or else the models are too fragile at 1:50 scale. It looks natural enough when it is printed, however.

/////////////////////////////////////////////////////////////
// module for stools ////////////////////////////////////////

module stool(radius,height){
scale(s)
union(){
// top
cylinder(r=radius,h=height*.1);
// legs
rotate(0,[0,0,1])
translate([radius*.6,0,0]) 
cylinder(r=radius*.3,h=height);
rotate(90, [0,0,1])
translate([radius*.6,0,0]) 
cylinder(r=radius*.3,h=height);
rotate(180, [0,0,1])
translate([radius*.6,0,0]) 
cylinder(r=radius*.3,h=height);
rotate(270, [0,0,1])
translate([radius*.6,0,0]) 
cylinder(r=radius*.3,h=height);
}
}

Monday, May 5, 2014

Day 252 - Large Rhombic Tricontahedron

Today we printed a large copy of a Rhombic Tricontahedron (Day 203) to give to a doctor friend who is leading the pack of those trying to figure out a vision problem of mine. It is so great to have a doctor that is actually curious about solving a puzzle; so many others send me on my way if they don't see an immediate answer. One puzzle he's interested in is George Hart's Frabjous assembly, which is based on the Great Rhombic Tricontahedron, which itself is based on the Rhombic Tricontahedron we printed today (which while "large" is not "great").


Thingiverse link: http://www.thingiverse.com/make:76939

Settings: Printed on a Replicator 2 with custom MakerWare settings for raft and minimal supports.

Sunday, May 4, 2014

Day 251: Extended Billy bookcases

Continuing from yesterday, today we printed some IKEA Billy bookcases with height extenders. The height extenders are sold separately and come in both wide and thin versions. I know you can put them on the tall bookcases, and I'm hoping you can put them on the short versions as well. Rather than print the extenders and try to balance them on the bookcases, we just printed extended one-piece bookcases:


Here they are with their non-extended brothers, in the full set of Billy bookcase possibilities:



Settings: Printed on MakerBot Replicator 2 with .3mm/low settings, with models lying flat so that support is not needed.

Technical notes, dimension/OpenSCAD flavor: The new extended models were rendered with yesterdays' bookcase module, but taller:

// wide short billy with extender
//bookcase(depth=11,length=31.5,height=55.375,shelves=4);

// wide tall billy with extender
//bookcase(depth=11,length=31.5,height=93.125,shelves=7);

// thin short billy with extender
//bookcase(depth=11,length=15.75,height=55.375,shelves=4);

// thin tall billy with extender
bookcase(depth=11,length=15.75,height=93.125,shelves=7);

Saturday, May 3, 2014

Day 250: Billy bookcases

Most of our furniture consists of bookcases, and our go-to bookcases are from IKEA's Billy bookcase series. The Billys currently come in short and tall flavors, both of which can be either wide or thin, with one option for a deeper bookcase:


These take almost no time at all to print, so you can make lots of them to see what combinations might fit and look best in your space:



Settings: Printed on a Replicator 2 on .3mm/low setting, at 1:50 scale. 

Technical notes, OpenSCAD flavor: The code for these bookcases uses the scaling factors and cuboid module from Day 248. The bookcase models are made by making a cuboid shape to enclose the bookcase, taking away the inside, and then adding shelves. The most difficult part was getting the shelf heights and gaps right so that the code can accept any number of shelves and return an evenly-spaced bookcase. We decided to make these with no backs, but it would be easy to add backs to these if desired. They print lying down so that no supports are needed.

/////////////////////////////////////////////////////////////
// module for making bookcases //////////////////////////////

module bookcase(depth,length,height,shelves){
scale(s)
union(){
difference(){
// body of the bookcase
cuboid(length,height,depth,sharp);
// minus an inside
translate([.1*length,.1*length,-depth/2])
cuboid(.8*length,height-.2*length,2*depth,sharp);
}
// put in some shelves
for (i = [1:1:shelves-1]){
translate([0,i*(height-.1*length)/shelves,0]) 
cuboid(length,.1*length,depth,sharp);
}
}
}

The current line of Billy bookcases can then be made with the following renders (uncomment whichever one you want to make):

// wide short billy
//bookcase(depth=11,length=31.5,height=41.75,shelves=3);

// wide tall billy
//bookcase(depth=11,length=31.5,height=79.5,shelves=6);

// wide tall deep billy
//bookcase(depth=15.375,length=31.5,height=79.5,shelves=6);

// thin short billy
//bookcase(depth=11,length=15.75,height=41.75,shelves=3);

// thin tall billy
//bookcase(depth=11,length=15.75,height=79.5,shelves=6);

Friday, May 2, 2014

Day 249: Friday Fail - From OpenSCAD crashes to Beefy win!

Sometimes things just don't work and I don't know why. For example, the new version of OpenSCAD is great but I couldn't get it to run on my old Mac laptop; it would immediately quit upon opening. After a few weeks of frustration and unsuccessful Googling I finally stumbled across this handy OpenSCAD Forum post from tbuser, who was having the same problem; it turns out it was a problem with OS 10.7.5, and tp3 answered with a downloadable fix. Thank you tbuser and tp3 and the interwebs for fixing this problem! I still don't know what that was all about, but one of the best things about the internet is that is allows me to find a way to muddle through even when I'm thoroughly underqualified and have no idea what is going on.

In celebration of recovering from this week's fail we are printing tbuser's Beefy Trophy model from Thingiverse, which he built by combining an existing statue model with some beefy arms like those in atartanian's Beefy Arm Starter Kit.


Thingiverse link: http://www.thingiverse.com/make:76742

Settings: Printed on a Replicator 2 with .3mm/low settings and a raft, using the built-in supports from tbuser's model instead of the usual MakerWare supports. This is my first time printing with these cool fractal-post-support-thingys, which I imagine come from MeshMixer in some way that I should learn about:


In fact there are a lot of things that I need to learn about this summer, including:
  • AutoCad's MeshMixer, which tbuser used to mashup the statue with the beefy arms;
  • MakeHuman, crazy amazing open-source software that atartanian used to make the beefy arms;
  • Everything else: Rhinoceros, Grasshopper, Blender, Maya, how to cook with a gas stove, how to live in a big city, how to use all the buttons on my synthesizer, and how to find and properly wear a dress when it is necessary, even though I seem to be some strange mashup of lady and beefy arms. 

Thursday, May 1, 2014

Day 248: Thursday refactor - Sofa redesign

On Day 230 we printed some tiny sofas to try to figure out what will fit in our Brooklyn apartment this summer. (The answer: not much!)  In the comments, kitwallace suggested a very clean refactoring of our clunky OpenSCAD code, as well as a way to make the sofa dimensions more accurate while still being rounded. Today we reprinted our sofa models with this improved code, and now more things fit in our apartment! The new model is on the left, the old on the right:


Thingiverse link: COMING SOON - eventually we'll post a full customizable set of models...

Settings: MakerBot Replicator 2 with .3mm/low, as usual.

Technical notes, improved OpenSCAD flavor: The top of the code is the same as on Day 230, with scaling factors set so that we can measure our sofas in inches and then create them in OpenSCAD using millimeters so that they print at 1:50 scale. Note the "soft" factor for making soft corners on things like sofas and beds, and the "sharp" factor for making hard things like tables and desks.

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

$fn = 12;     // facets
scale = 50;   // enter desired scaling factor here e.g. 50 means 1:50
m = 25.4;     // measurement unit conversion
      //(m=25.4 does 1:1 scale with inches entered)
      //(m=12*25.4 does 1:1 scale with feet entered)
      //(m=10 does 1:1 scale with cm entered)
      //(m=1000 does 1:1 scale with meters)
s = m/scale;  // scaling factor 
soft = 3*s;   // radius for soft bevels depends on scale
sharp = .2;   // radius for sharper edges

The next section is a neat cuboid module that save us work when constructing the sofa shapes from rectangular solids. The cuboid is made by forming a hull around spheres that are placed at its eight corners, and the coordinates of the centers of those spheres are defined so that the size of the sphere doesn't affect the overall dimensions of the object. In other words, sofas have corners that are rounded in, rather than sides that poof out, as we had in our previous model. It seems like a little thing but at 1:50 scale it can make a difference of a few inches, which is significant when trying to see if your furniture will pack into a small space!

/////////////////////////////////////////////////////////////
// module for cuboids ///////////////////////////////////////
// thanks, kitwallace! //////////////////////////////////////

module cuboid(depth,length,height,r) {
hull(){
translate([r,r,r]) sphere(r);
translate([depth-r,r,r]) sphere(r);
translate([depth-r,length-r,r]) sphere(r);
translate([r,length-r,r]) sphere(r);
translate([r,length-r,height-r]) sphere(r);
translate([depth-r,length-r,height-r]) sphere(r);
translate([depth-r,r,height-r]) sphere(r);
translate([r,r,height-r]) sphere(r);
}
}

Now that we have the cuboid module, it is easy to make a sofa shape out of four of those cuboids. Another improvement from our previous code is that the scale is built into the top level of the module instead of being factored into every dimension or translation.

/////////////////////////////////////////////////////////////
// module for making sofas //////////////////////////////////

module sofa(depth,length,height){
scale(s)
union(){
// back of sofa
cuboid(depth/4,length,height,soft);
// left arm of sofa
cuboid(depth,depth/4,height*.6,soft);
// right arm of sofa
translate([0,length-depth/4,0])
                    cuboid(depth,depth/4,height*.6,soft);
// cushions of sofa
cuboid(depth,length,height*.4,soft);
}
}

Finally, all that is left is to measure your sofa's dimensions and render with the "sofa" module. By the way, this one doesn't fit in our apartment, so let me know if you are in the market for a very nice brown loveseat.

/////////////////////////////////////////////////////////////
// render ///////////////////////////////////////////////////

// brown loveseat
sofa(depth=36,length=54,height=34);

Wednesday, April 30, 2014

Day 247 - Geek glasses fix!

Today we printed a modern 3D-printed version of the classic "taped glasses" fix. A little plastic piece fell off C's glasses and got lost, and without it the arm of the glasses springs out to the side, which is funny but not so great for reading. C designed this replacement piece himself, using calipers to measure the required dimensions and Tinkercad to build the 3D model. Along the way we had a great lesson on using the Align, Group, and Ruler tools, and re-measured and re-designed quite a few times before it was just the right shape and size. Here is the clear plastic piece superglued into its new home:


Thingiverse link: http://www.thingiverse.com/thing:323882

Settings: Printed on a MakerBot Replicator 2 in the blink of an eye. :)

Tuesday, April 29, 2014

Day 246 - An eye for an eye

Today we were supposed to get a tooth pulled out (!) so we printed something very simple and relaxing: stevemedwin's Space Family Puzzle on Thingiverse. By "we" I mean "I" and by "supposed to" I mean that I ended up not having to get the tooth pulled. Long story. But it did have to do with my eyes (?!), and this model reminds me of a sad, downward-looking eye. If you want to think of happier things you can take stevemedwin's interpretation of this as a comfy space family all nested together.


Thingiverse link: http://www.thingiverse.com/make:76266

Settings: Replicator 2 with .3mm/low, as usual.

Stuff to change: This model printed in one piece, with everything nested together. This was great for the interior sphere and its surrounding circle, but was less great for the other nested circles. Removing supports from between the circles was tricky and in the end the exterior circles can be taken apart and put together again anyway, so I'd rather print this as ball-in-little-circle with two other separate circles than all nested together.

Monday, April 28, 2014

Day 245 - Large Buckyball

We liked yesterday's little Buckyball so much that today we printed pmoews' Large Buckyball from Thingiverse. Both models are icosahedral; you can see the icosahedron shape if you look at the "corners" of each model and ignore the honeycomb patterns. The photo below shows yesterday's C320 in the background and today's C540 model in the foreground. The numbers refer to the number of carbon atoms in each Buckminsterfullerene.


Thingiverse link: http://www.thingiverse.com/make:76264

Settings: Printed on a MakerBot Replicator 2 with no supports except for the external support stand that prints along with the model. We printed this one at 120% scale to make it even bigger, but that made the stand thicker also, and therefore more difficult to remove. Next time I'll redo the scaling in OpenSCAD instead, so that I can scale up the Buckyball while making a new stand that preserves its fine grid.

Technical notes, math flavor: The even smaller C60 Buckminsterfullerene has the shape of a soccer ball, with 12 pentagons faces, 20 hexagon faces, and 60 vertices. As a polyhedron it's known as the Truncated Icosahedron, and we printed it on Day 91 with snap-tiles:


In general a Buckyball is just a convex polyhedron made up of regular pentagon and hexagon faces, with each vertex having three edges coming into it. A really cool fact is that every Buckyball has exactly 12 pentagon faces, just like the soccer ball; if you look at the pictures of C320 and C540 you can see that the corner cells of the icosahedral shapes of the models are tiny pentagons, while every other cell is a tiny hexagon.

Here's the classic proof that all Buckyballs have 12 pentagon faces. The proof uses the fact that the Euler characteristic of anything topologically equivalent to a sphere is 2, or in other words, that if a polyhedron has V vertices (corners/points), E edges, and F faces, then

= 2. 

While that fact is true of all polyhedra (!), we can say more about Buckyballs. In particular, the number F of faces of a Buckyball is the sum of the number of its pentagon faces and the number of its hexagon faces:

F = P + H.

In addition, each pentagon face of a Buckyball has 5 edges surrounding it, and each hexagon face has 6 edges surrounding it. If we calculate 5P+6H we get the total number of edges on the Buckyball, but counting every edge twice - since every edge meets exactly two faces. In other words we have:

E = (5P + 6H)/2.

But there is another way to count the number of edges on a Buckyball: Each vertex has three edges coming into it, which means that 3V counts the number of edges, but again over-counting by a factor of two due to the fact that every edge will be counted by two vertices, one on each of its endpoints. Thus E = (3V)/2, and combining this with the previous equation gives:

V = (5+ 6H)/3.

Putting the three previous centered equations into the Euler characteristic formula gives us:

(5P+6H)/3 - (5P+6H)/2 + (P+H) = 2.

Surprisingly, when you multiply both sides of this equation by 6 to clear fractions and then combine terms, all of the H terms cancel and you are left with:

P = 12. 

Therefore every Buckyball has exactly 12 pentagon faces. In a way you can think of Buckyballs as expansions of the 12-pentagon-faced dodecahedron, with hexagons added between the pentagons to make an icosahedral shape with the 12 pentagons at the corners.

Sunday, April 27, 2014

Day 244 - Buckyball with stand

Today's print is the small Buckyball model from pmoews' Buckyball Easter Egg gift set on Thingiverse. Like owens' Menger Sponge with External Support model (see Day 157), this Buckyball prints with no internal supports, while being supported underneath by an external custom-made removable stand that prints along with the model. Genius!


Here's a shot of the Buckyball being laid down over the supports. Although it sits on the supports, it does so lightly, probably with some clearance added in the file so that it actually prints a tiny bit above the supports (at least that's how the Fidget Cube works from Day 145).


Young C found out that if you put the Buckyball in water, the cells fill up with water windows that make really cool bubble-lens views of the opposite side of the model:


Thingiverse link: http://www.thingiverse.com/make:76258

Settings: MakerWare .3mm/low on a Replicator 2 with no supports (except for the external support stand that is built into the model).

Saturday, April 26, 2014

Day 243 - Base for shell models

Last week I used the shell model from Day 237 in class and it was so great to get to that point at the board where my picture is all crazy and I start apologizing for not being able to draw a really good picture of the shells and then be able to say "oh, wait, I happen to have a physical model of this exact example RIGHT HERE" and then pass it around the class.

The only tricky part was picking up the model, since it is made of shells that kind of slide around when you try to grab them all together. So today I made a base for the model and stamped it with the name of our Taalman/Kohn Calculus book so that the publisher can give these models away to people who are using the book. This model is an eight-shell approximation of the volume described Exercise #29 in Section 6.2 (or Section 9.2 if you're using the Calculus I with Integrated Precalculus version): the solid of revolution defined by rotating the region between f(x)=4-x^2 and the x-axis on [0,2] around the y-axis.


Thingiverse link: http://www.thingiverse.com/thing:305282

Settings: Printed on a MakerBot Replicator 2 with .3mm/low.

Technical notes, OpenSCAD flavor: This model is really simple, so a good example if you're new to OpenSCAD. It uses the write.scad code which is included with this command:

use <write.scad>

If the file is in a separate directory then you'll also need to include the path to the file. The code is simple, just make two circles with holes cut out to hold the model, remove a bar through the intersection for the text to pass through, and add the text. 

// name base for the first-example models
difference(){
union(){
// left holder
difference(){
color("white") cylinder(h=4,r=30);
translate([0,0,1.2]) cylinder(h=3,r=26);
}
// right holder
difference(){
translate([0,56,0]) color("white") cylinder(h=4,r=30);
translate([0,56,0]) translate([0,0,1.2]) cylinder(h=3,r=26);
}
}
// box to clip out center
translate([0,30,6.2])
cube([17,30,10],center=true);
// names
translate([0,28.5,3.6]) rotate(90,[0,0,1]) 
color("blue") write("TAALMAN/KOHN",t=6,h=12.5,center=true);
}