Assignment 6: Molding and Casting
The "Love it" Button
The what button?
My research group, Lifelong Kindergarten, has developed Scratch, a programming language for kids to make their own animation, games and interactive art and share them on the web. Each project that is shared on the Scratch website has a "Love it?" button. Users can press this button to show their affection for another users project. Projects show a count of how many "love its" they have received, and the projects that are "top loved lately" are shown on the scratch home page. Here's how the button looks:
Before you press it:
After you press it:
So this week I hoped to create a tangible version of the heart icon, to serve as a physical "love it" button. Later, with the addition of some electronics, it would light up or make a sound when you press it. It could be used metaphorically, so it could be attached to anyone or anything, so that people can show that they love it. Or it could be used more literally as a tangible interface to the web site, as another way to "love" a scratch project by pressing the button.
A contoured 3D Heart?
My first thought was to try to make a nicely contoured 3D version of the heart, with smooth pillow-like curvature. I would love to learn a way to do this. I couldn't think of a good way to express the shape mathematically in cad. I played around with gradient fills in Fireworks (a vector and bitmap editor from Adobe/Macromedia), but I couldn't get anything satisfactory. The gradients are spherical, so even several of them summed together wouldn't make quite the right shape. As I was playing with this, though I eventually abandoned the idea, I decided I need a way to preview in 3D the grayscale heightmap bitmaps I was creating...
Previewing 3D surfaces in Matlab
My lab mate Jay Silver pointed out that Matlab would make it easy to do this. So I loaded my grayscale PNG into matlab, and after playing around for a bit, I came up with a way to generate a 3D surface, which you can rotate around. Here are my instructions:
Import your PNG into matlab using file->open (you can also use the imread function), then exectute this line:
y=cdata(:,:,1); y=double(y); y=255-y; surf(y);
Basically, it puts the data from one color channel into a new matrix, casts it to double, inverts it, and then makes a 3D surface graph.
And here are the results:
A flattened heart
So as you can see from the images above, I went instead with a flat heart, and put some writing on it (the "Love it" link) and the Scratch cat, who is the icon for scratch.
Shave and a haircut (two bits)
Fortunately I realized that it would make sense to use two different bits to cut this design: a 1/8th bit to cut out the whole heart volume, and a 1/64th to get the fine details of the lettering and the cat. So I split my design into two png files. I spent a fair amount of time tweaking individual pixels, then running it through cad's contouring to see where the toolpaths ended up. One key thing was using no anti-aliasing, so as to have nice sharp edges. The curves look jaggy on the screen, but the toolpath smooths them out, and it's better to have that than an inconsistent toolpath which results from the multiple levels of gray in anti-aliasing. A cad feature request: I would love to be able to see, in addition to the centers of the tool paths, the actual width of the cuts; this would allow me to predict, for example, whether or not two cut out areas would merge or stay separate (otherwise you have to eyeball it).
PNG offset problem
So I set out to cut, and quickly realized there was a very strange problem, either a bug in cad or a confusing "feature:" the tool was cutting way off of the edge of my wax- apparently the origin was not in fact being put where cad clearly marks it with a green cross on the screen. After several false starts I eventually realized that the origin for the milling machine was being placed in the exact center of my png. I compensated for this by setting xmin to half the width and ymin to half the height of the image, and then it worked fine.
Incomplete contouring (or milling?) problem
This is probably another cad bug. I switched over to the 1/64th bit, and milled the text and the cat. It looked like it was working beautifully. But then I noticed that the interior parts of all the letters were actually untouched- it was sort of cutting outlines! Perhaps some setting (the tool diameter or tool overlap) is being calculated incorrectly for contouring. Here's how it looked (this is after I had already fixed a lot of it by hand):
Stubborn wax problem
The wax dust in the detail parts did NOT want to come out. It resisted vacuuming and gentle brushing. I spent about an hour total carefully removing all of it, along with all the untouched interiors of the letters, using a pair of sharp tweezers.
Is there a particular type of 1/64th bit that would work better to clear the wax out of the mold? Is the wax just really sticky when it is ground so fine, or is it actually melting and re-solidifying?
The finished mold and "Love it!" button