Welcome to MakerHome




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


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);
}

Friday, April 25, 2014

Day 242 - Time Turner

Last Friday we talked about time and failing. Today we have a more positive thing to say about time, and we printed khakerry's Time Turner model from Thingiverse. (What I wouldn't give to have Hermione's device for being two places at the same time!)

This model was built from the ground up in Tinkercad, which I know because khakerry was a student of mine last semester in the JMU 3-SPACE classroom. Although she had had no previous 3D modeling experience, her designs were incredible and included guitar pegs and a modular ukulele (!). Here is the really cool part: Today I held a 3D-printing workshop at the Spring MD/DC/VA MAA meeting and two of the faculty members at that workshop chose this Time Turner design as the thing they most wanted to print while in the workshop. They found the model on Thingiverse and had no idea that it was made by a student in the very classroom they were visiting! In fact I didn't either until I got home and my brain finally put the pieces together. Time and space move in circles:


Tinkercad link for remix: https://tinkercad.com/things/9cONGRk2W5o-day-242-relevel-of-khakerrys-time-turner
Thingiverse link: http://www.thingiverse.com/make:75052

Settings: Printed with a Replicator 2 on .3mm/low settings, at 150% scale.

Technical notes, Tinkercad flavor: This model printed very well on the Afinia H-Series printers in the classroom, but on my Replicator 2 at home things didn't go as well. Since khakerry was nice enough to make the model public on Tinkercad I could find my problem, which was that not all of the pieces sit on the platform. On the Afinia we were using raft and supports so this was not so bad, but I was trying to print the model on my Replicator without any scaffolding, so the higher pieces of the model were not adhering to the platform. This is an easy fix in Tinkercad with the Group/Ungroup, Align, and Ruler tools. If you're new to Tinkercad make sure you are fluent in these tools.

In this case I ungrouped the model and moved the three rings apart to deal with them separately. Then I ungrouped each ring, resized the main part of the ring to 5mm with the Ruler, re-Aligned the holes so they could be centered, made sure that each ring was level to the Workplane, and Aligned the three rings. Notice that if we had just scaled the rings without ungrouping, the holes in the rings would have been stretched and become ovals instead of circles, so the order that you group/align/scale is important. Be careful too about the order that things are grouped and re-grouped! Sometimes you may need to group things to align them correctly, then ungroup to get your holes back for regrouping later.

In the re-aligned file above I also changed khakerry's configuration of stars, since some of them were printing out too small to see, causing the printer some distress.

Stuff to change in the future: The remix of this model was intended to print without support, but I forgot to change the hanging-loops accordingly so there was some threading on that part of the model.

Thursday, April 24, 2014

Day 241 - Six-piece bar puzzle

The other day we picked apart the OpenSCAD code for althepal's six-piece ball puzzle (Day 239), so today we made a simple remix, removing the line of code for the enclosing sphere to make a six-piece bar puzzle. Our original intention was to add some spines or something to the ball, but this bar puzzle has a nice look, requires some dexterity to assemble, and holds together nicely once put together:


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

Settings: Printed on a Replicator 2 on .3mm/low at 50% scale in about 70 minutes.

Wednesday, April 23, 2014

Day 240 - W clip

Today we printed something useful: thomasforsyth's Clip peg - general purpose model from Thingiverse. It's not springy and it doesn't open far, but it does clip very securely. It's going to be great to be able to print these again when I inevitably lose them somehow.



Settings: Replicator 2 on .3mm/low.

Tuesday, April 22, 2014

Day 239 - Six-piece ball puzzle

Today we printed althepal's Six-piece soccer ball puzzle from Thingiverse. I have a lot of puzzles like these in my office at work, and people often take them apart and then don't have enough time to figure out how put them back together again. The puzzles can be a pain for me to reassemble and don't really display well as pieces. Fortunately, with 3D-printed puzzles you can just print an extra copy for people to play with, and leave a display copy intact! This is a classic puzzle that is especially cool because it is made up of six identical pieces:


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

Settings: Printed on a Replicator 2 on .3mm/low settings at 50% of original scale.

Technical notes, OpenSCAD flavor: althepal's code is simple and elegant, and I've rearranged it and added comments below so you can see how it works. After the resolution and scaling parameters are set, the object itself is made by removing notches from a long cuboid shape and then intersecting with a sphere to make a rounded exterior. To see how this works, try compiling this in OpenSCAD and adding a "#" character in front of each cube and sphere command, one at a time. This will cause the corresponding cube or sphere to be highlighted in red so that you can see how it fits into the object.

// code from althepal with comments added by mathgrrl
// http://www.thingiverse.com/thing:219502/#files

// resolution
$fn = 100;

// radius of enclosing sphere
r1 = 30;

// side length of cuboid for pieces
s1 = r1 * 13.3 / 20;

// the puzzle piece (print six times)
intersection(){
// start with a long cuboid with notches cut out
difference(){
// start with a long cuboid
translate([0,-100, 0])
cube([s1,200, s1], center=false);
// remove notch with rotated cuboid shape
translate([s1, s1 * cos(45) + 0.5, s1])
rotate([45,45,0])
cube([200, s1, s1], center=true);
// remove another notch with rotated cuboid shape
translate([s1, -s1 * cos(45) - 0.5, s1])
rotate([45,45,0])
cube([200, s1, s1], center=true);
}
// intersect with sphere to cut off and make rounded
translate([r1 * cos(45),0, r1 * cos(45)])
sphere(r = r1);
}

Stuff to change next time: Although the 50% scale model printed perfectly, it is very difficult to assemble.  Although it is very cute when tiny, I would recommend printing this model at original size.

Monday, April 21, 2014

Day 238 - Shellmaker 2

More shells! This time we printed a model to match an example from the Khan Academy, so that you can go there and learn how to set up the definite integral for this volume with shells if you have a mind to. The volume is obtained by rotating the region between y=(x-1)(x-3)^2 and the x-axis on [1,3] around the y-axis. We made an 8-shell version and a 16-shell version, plus an "exact" version made by using 100 shells and zero clearance between shells.


Here are all the pieces; I thought the 16-shell model would be difficult to reassemble after taking apart, but everything drops easily back into place without any fuss:


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

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

Technical notes, OpenSCAD flavor: The code for the 8-shell model is below.

// mathgrrl shellmaker

// shell approximation of a solid of revolution

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

// facet resolution
$fn = 48;

////////////////////////////////////////////////////////////
// function and renders ////////////////////////////////////

// define the function
function thefunction(x) = (x-3)*(x-3)*(x-1); 

// make the shell model
shellmaker(a=1,b=3,n=8,clearance=.8,width=60); 

////////////////////////////////////////////////////////////
// module for midpoint shells //////////////////////////////

module shellmaker(a,b,n,clearance,width){
// delta x depends on a, b, n, and clearance
delta = (b-a)/n;

// scale depends on a, b, and width
scale = .5*(width/(b-a)); 

// shift for making clean holes
shift = .5*1;

// innermost shell does not have clearance on inside
difference(){
// large function cylinder to outside of interval
cylinder(
r = scale*(a + 1*delta) - clearance/2,
h = scale*thefunction(((a + 0*delta)+(a + 1*delta))/2)
);
// small function cylinder to inside of interval
// when a=0 this cylinder is degenerate
// when a>0 we take out the whole center piece with max height
translate([0,0,-shift/2]) 
cylinder(
r = scale*(a + 0*delta),
h = 2*scale + shift
);
}
// middle shells have clearance on both sides
for (k = [2 : n-1]){
// construct the shell with a difference of cylinders
difference(){
// large function cylinder to outside of interval
cylinder(
r = scale*(a + k*delta) - clearance/2,
h = scale*thefunction(((a + (k-1)*delta)+(a + k*delta))/2)
);
// small function cylinder to inside of interval
translate([0,0,-shift/2]) 
cylinder(
r = scale*(a + (k-1)*delta) + clearance/2,
h = scale*thefunction(((a + (k-1)*delta)+(a + k*delta))/2) + shift
);
}
}
// outermost shell does not have clearance on outside
difference(){
// large function cylinder to outside of interval
cylinder(
r = scale*(a + n*delta),
h = scale*thefunction(((a + (n-1)*delta)+(a + n*delta))/2)
);
// small function cylinder to inside of interval
translate([0,0,-shift/2]) 
cylinder(
r = scale*(a + (n-1)*delta) + clearance/2,
h = scale*thefunction(((a + (n-1)*delta)+(a + n*delta))/2) + shift
);
}
}

The 16-shell model and "exact" model from today can also be rendered from this code, with:

shellmaker(a=1,b=3,n=16,clearance=1,width=60);
shellmaker(a=1,b=3,n=100,clearance=0,width=60);

Yesterdays' 8-shell model and its "exact" counterpart were made with the same code applied to a different function:

function thefunction(x) = 4-x*x;
shellmaker(a=0,b=2,n=8,clearance=.8,width=50); 
shellmaker(a=0,b=2,n=100,clearance=0,width=50);

Stuff to change: The increase in clearance to 1mm on the 16-shell model was too much, and the model is too loose. But with less clearance the model tended to run together and adjacent shells got stuck. Next time I would reduce the clearance and print the odd shells separately from the even ones to fix the sticking problem.

Sunday, April 20, 2014

Day 237 - Shellmaker

Tomorrow in calculus we'll be discussing how to approximate volumes of solids of revolution using "shells". This is traditionally a very difficult concept for students to visualize, so having a physical model is really helpful. The trouble is, no physical models seem to exist. We've all talked about "onion skins" or brought in Quarto pieces or other shell-like objects, or even cut cakes into shells for illustration, but those things are just simplified versions of the situation. Our volumes-by-shells model on Day 144 was nice, but made in Tinkercad and thus not very customizable. Today we upgrade to an OpenSCAD model. The model shown on the left is the solid obtained by revolving the region between the graph of y=4-x^2 and the x-axis on [0,2] around the y-axis, and the model on the right is an approximation of that solid using eight shells.


The shell model comes apart into its individual shells:



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

Technical notes, math flavor: (Apologies for the bad math typesetting is what is to follow; I haven't had luck with WordPress and math formatting or embedding LaTeX code.) These heights of these shells were determined using the midpoints of eight subintervals from x=0 to x=2. The reason we use the midpoints is that it allows us to use a very nice formula for computing the volumes of the shells that will allow us to construct a Riemann Sum, and thus a definite integral, to express the exact volume. Suppose we've subdivided [0,2] into eight subintervals of the form [x_{k-1},x_k]. Then each shell is just a really tall washer with inner radius x_{k-1}, outer radius x_k, and height given by the function curve somehow. Let's take the height at the midpoint m_k = (x_{k-1}+x_k)/2 of the subinterval. Then our kth shell has volume
V_k = pi * (x_k)^2 * f(m_k) - pi * (x_{k-1})^2 * f(m_k).

By factoring out like terms we can turn this into:

V_k = pi * f(m_k) [ (x_k)^2 -(x_{k-1})^2].

Now using the fact that a^2-b^2 = (a+b)(a-b), together with the definition of m_k and DeltaX = x_k - x_{k-1} and a bit of algebra, we can write this volume as:

V_k = 2 * pi * m_k * f(m_k) * DeltaX.

This formula isn't any easier to use in practice, say if we were to actually calculate and add up the volumes of the eight shells pictured above; however the form of this kth volume expression - and in particular the presence of the DeltaX in the expression - allows us to construct a definite integral that represents the exact volume of the solid of revolution.

Technical notes, syllabus flavor: Calculus profs will notice that late in the semester is an odd time to talk about volumes with shells; if you're teaching Calc 2 then that's usually in mid-semester. Here at JMU we teach a two-semester Calculus I with Integrated Precalculus course that goes about a third of the way into Calc 2, so we get through Riemann sums, the Fundamental Theorem of Calculus, techniques of integration, and volumes/applications by the end of the second semester. 

Saturday, April 19, 2014

Day 236 - Conference swag x 8

Today, eight models we've seen before, optimized for printing small and fast. We'll be printing one of these tiny models for each person that comes to the Fall Meeting of the Maryland/DC/Virginia section of the Mathematical Association of America, which will be hosted here at JMU next week.

Friday, April 18, 2014

Day 235 - Friday Fail: Time Edition

There is never enough time. Over the past few weeks I have failed miserably at time, specifically at keeping up with this blog on a daily basis. I've been "a few days behind" - sometimes an entire week! - for a long time now; always printing and working every day, but always behind. But it's not like I haven't been printing things. For example, here is some of what I printed in the past few days, making giveaways for a conference (more on that tomorrow):


But none of that made a blog post for me. However things in Life are settling down now and as of today I'm caught up - or at least one day short, with it being Saturday while I post this Friday Fail - so I am going to try to keep up with time from here on out. Time, by Grabthar's hammer, I will catch you!

UPDATE 4/27/14: Surprise, I'm still behind! Just after catching up I started getting sick and I'm just starting to crawl out of that hole now. I swear I'm never going to promise to do something EVERY DAY FOR A YEAR again. On the other hand I always catch up in the end so maybe it is okay. Right?

Thursday, April 17, 2014

Day 234 - S(5,2,(1,1,-1,1))

This semester five students and I have been 3D-printing the knots through 7 crossings in both standard and special configurations, as part of our MATH 297 - Knot Theory Research and 3D Printing course in the JMU 3-SPACE classroom. One of the knots that fell to me was 7_6, which happens to be the spiral knot S(5,2,(1,1,-1,1)). This means that it can be represented as a braid that has 5 strands, one of which crosses the others in an "over, over, under, over" pattern for a repeat of 2 times; or in other words, that the knot can be obtained with braid word (abCd)^2. All that is nice, but for the purposes of this post all that matters is that the knot 7_6 can look all spirally like it does in this picture:


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

Settings: Printed on a Replicator 2 with our custom MakerWare support profile for knots from Day 110. The model has so many long pieces that if you orient vertically as in the picture below, you can get away with almost no support at all. This is the least amount of support I have ever had for any knot!


Technical notes, TopMod flavor: I am very excited to report that I actually constructed this knot by hand, one arc at a time, in TopMod. Although I did make the knot from Day 137 with TopMod, I was not trying to make that particular knot; this is the first time that I had a certain knot in mind and then constructed it in TopMod, rather than with equations or data. The reason I did that is that I don't know the equations or have any data for the spiral conformation of 7_6; I just knew what it was supposed to look like! In case anyone out there is interested in using TopMod to construct knots, here is a step-by-step breakdown of what I did, starting with a 2-dimensional projection of the conformation I wanted to build:
  1. Open TopMod and click on the cube to put down one box.
  2. Select a face of the box and use the Cubical Extrude button to extend into a connected line of boxes (I used x50 to get a line that was 50 blocks long). In the 7_6 spiral case I knew that all of the crossings would end up on one line so that was all I needed to get started. For other knots and other conformations you'll have to use Cubical Extrude to build a branching framework to build from.
  3. Use Selection/Edge Ring to select boxes to delete from your row. I deleted two boxes between every one box that I wanted to keep, plus a few more for the center. After deleting I had six separated boxes in a line, followed by a gap, followed by six more separated boxes.
  4. Select the tops of all your boxes and Cubical Extrude x8 to get some height. You will be connecting boxes at various heights to make the arcs between each crossing in your knot projection.
  5. Make the arcs of your knot by connecting faces of boxes as desired with the Add Handle (Shape Interpolation) Mode button. As part of this you will have to adjust the number of segments (for a finer or coarser look) and the weight (to determine the curvature of the connecting handle). When you select two faces to connect with a handle you will also select a corner on each face, which will determine how twisty the connecting handle is. You can also manually set the number of twists if desired.
  6. Once all your arcs are in place, delete any unneeded cubes using Selection/Edge Ring and the wonderful tool "=", which expands a selection outward one step at a time.
  7. You should now have a choppy-looking curve in the desired conformation of your knot. Use Remeshing/Corner Cutting twice to get a smoother knot model.
  8. Export to STL; this may take a minute because TopMod will have to further refine your mesh to be triangular as it is performing this export. 
Technical notes, Blender flavor: The knot produced by the method above had fairly thin strands, so to thicken them up I used Blender. Although one of our lab students wrote the excellent post Adding Thickness to your STL file at the MakerLab blog last December, I had not used this method until today. I also consulted the Interface and Navigation video at BlenderCookie to learn how to move around: scroll wheel to zoom, middle-click and drag to rotate view, and shift-middle-click and drag to pan view.
  1. A new "starting document" in Blender will contain a camera, light, and cube, which I wasn't sure what to do with. For the moment I learned how to hide them: in the upper right "Scenes" box, deselect the eye, arrow, and camera icons for all three.
  2. File/Import/STL and choose the file you want to open. You may have to zoom out a lot to see your model. 
  3. Under the "Scenes" box in the right column, choose the "wrench" icon to get to Object Modifiers. You may have to expand the width of the right column to see the wrench icon.
  4. Choose Add Modifier/Solidify with Thick changed to 2 and Offset to 0. Pressing return after setting the offset performs the action so you do not need to click "Apply". 
  5. Export your new, thickened STL file. 

Wednesday, April 16, 2014

Day 233 - Bedmaker

We don't have one bed of every size in our house but it seemed like a good idea to print all of the sizes; here we have Twin, Full, Queen, and King:


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

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

Technical notes, OpenSCAD flavor: Picking up where we left off in yesterday's code, we're back to larger spheres at the corners to make our beds seem comfy. Nothing too interesting here, except that it is good to note that the height parameter in this code does not include the height of the pillow.

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

module bed(depth,length,height){
// mattress
hull(){
translate(s*[0,0,0]) sphere(r);
translate(s*[depth,0,0]) sphere(r);
translate(s*[depth,length,0]) sphere(r);
translate(s*[0,length,0]) sphere(r);
translate(s*[0,length,height]) sphere(r);
translate(s*[depth,length,height]) sphere(r);
translate(s*[depth,0,height]) sphere(r);
translate(s*[0,0,height]) sphere(r);
}
// pillow
hull(){
translate(s*[0,0,(5/4)*height]) sphere(r);
translate(s*[0,(1/8)*length,(5/4)*height]) sphere(r);
translate(s*[depth,(1/8)*length,(5/4)*height]) sphere(r);
translate(s*[depth,0,(5/4)*height]) sphere(r);
translate(s*[0,0,0]) sphere(r);
translate(s*[0,(1/8)*length,0]) sphere(r);
translate(s*[depth,(1/8)*length,0]) sphere(r);
translate(s*[depth,0,0]) sphere(r);
}
}

Tuesday, April 15, 2014

Day 232 - Bookcasemaker

Continuing our moving series, today we made an OpenSCAD module for making the most important type of furniture at all: bookcases! Here we have some Bondes (now discontinued, sadly) and Hemnes from IKEA, as well as a low TV stand:



Thingiverse: http://www.thingiverse.com/make:77833

Settings: MakerWare .3mm/low on a Replicator 2 with the bookcases on their backs so that support is not required.

Technical notes, OpenSCAD flavor: Again we continue from the previous day's code. The interesting thing today is that we added a parameter for number of shelves and used a for() loop to put them in. The tricky part was handling the translation correctly while putting in those shelves.

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

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

Monday, April 14, 2014

Day 231 - Tablemaker

Continuing with our (procrastination of) planning for this summer's move, we printed our dining room table and two coffee tables.


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

Settings: Printed on a Replicator 2 with MakerWare .3mm/low, upside-down so as not to require supports.

Technical notes, OpenSCAD flavor: Continuing with the same parameters as yesterday's code, today we constructed a table module. Since tables are sharper than sofas we used smaller spheres at the corners. The result is slightly nicer than just using the very sharp cube() module that we used for the legs.

/////////////////////////////////////////////////////////////
// module for making tables /////////////////////////////////

module table(depth,length,height){
// body of table
hull(){
translate(s*[0,0,0]) sphere(tiny);
translate(s*[depth,0,0]) sphere(tiny);
translate(s*[depth,length,0]) sphere(tiny);
translate(s*[0,length,0]) sphere(tiny);
translate(s*[0,length,depth/5]) sphere(tiny);
translate(s*[depth,length,depth/5]) sphere(tiny);
translate(s*[depth,0,depth/5]) sphere(tiny);
translate(s*[0,0,depth/5]) sphere(tiny);
}
// legs
translate(s*[0,0,0])
cube(s*[depth/5,depth/5,height]);
translate(s*[depth-depth/5,0,0]) 
cube(s*[depth/5,depth/5,height]);
translate(s*[0,length-depth/5,0]) 
cube(s*[depth/5,depth/5,height]);
translate(s*[depth-depth/5,length-depth/5,0]) 
cube(s*[depth/5,depth/5,height]);
}