Bedside Tables - Part I

  After finishing up on the upstairs bench, we decided that the next project would be a pair of matching bedside tables. These are especially needed as we currently only have one bedside table of an awkward height, resulting in both of our alarm clocks resting on the floor. In this post I'll share with you some of our early designs, consideratiins in the design process, and the finnal design we settled on (teaser; I think it is almost something out of Battlestar Galatica).
A quick sketch of the shelves, angles and door.
  We went through a few iterations of the design process, first up was what do the drawers / shelves look like? Our current bedside stand lacks a door, and this is something that we knew we wanted.

  My main concern was not showing that ugly stacked side of the plywood on any side of the table. I knew that there was a way in which I could achieve this without giving up any structural support. At the back of my mind I also knew that it involved canting the legs at a 45 degree angle, but for once I could not visualize it just in my mind, but a quick sketch showed me the path. I think we'll still have some showing from the top shelf, but some trim may be able to help with that.

Here's my detailed dimensions sketch after I measured the space.

  By canting the legs at this angle, the shelves can attach directly to them, and the plywood layers of the walls will terminate into the legs. Further, I think having the legs angled should allowed for more room for the front door to swing open. To top it all off, I think we're really going to like the slightly recessed look on the sides. Oh yeah, and the octagon shape is reminiscent of the trimmed squares of the Battlestar remake.

Anyway, this construction will go in parts as the tables get progressively closer and closer to completion - furniture-making is not our full time job, but our part-time hobby, so most of these large projects take weeks, if not months to finish, but it should be interesting for us to show you how everything comes together.

Matlab Startup (.m)

For those of you who use MATLAB on a regular basis, I'd like to share a trick I use to simplify my life considerably. One of the things I find myself constantly doing is resizing text on figures. I'm always increasing text to 14-16 point font and setting the face to bold. This is okay if you have one figure to make, but when you need to do it to every figure, and there are 10-20 staring back at you?

First you could start by setting the default figure - you can address its properties using 0 (zero) as the figure handle (see below for more on handles). But there's an even easier way! Using startup.m, we can set the defaults so that when MATLAB starts, the font size / face for the graphs will be set. When MATLAB loads, it looks for a script called "startup.m" which it will then execute before giving you control. By placing our overrides for the default figures here, we don't have to enter them in by hand every time we start MATLAB.

Here's how to do it: Open a new script and save it as startup.m in one of the paths MATLAB searches. You can find the paths by going to File -> Set Path. Something like "My Documents\MATLAB\" would be an example path for a Windows user.
Now for the contents of the script. Here's mine;
% startup.m
% Called at MATLAB startup.
% Sets defaults for figures (use 0 for figure handle)
% Adjust figure defaults for better font read-ability

set(0,'DefaultFigureColor',     'white',...
      'DefaultAxesColor',       'white',...
      'DefaultTextFontSize',    16,...
      'DefaultAxesFontSize',    14,...
      'DefaultTextFontWeight',  'bold',...
      'DefaultAxesFontWeight',  'bold');

% Load up my lovely custom colormap that uses black as middle value.
load('MyColormaps');
set(0,'DefaultFigureColormap',mycmap);
clear;
Let's go over each command;
set(0,'DefaultFigureColor', 'white',...,'DefaultTextFontSize',16,'DefaultAxesFontSize',14,...);
If you're not familiar with the get() and set() commands you really should be. These are a great instant-reference when you need something. The syntax is usually get(FigureHandle) and set(FigureHandle,Property,Value). If you're working on only one figure, you can use get(gcf) (get all values for the current figure), a list of properties and values will be displayed to you. If you are working with multiple figures, it is usually best to assign each one a unique handle, so you don't get confused. For example; "myh1 = figure;" assigns the next figure created a handle of "myh1", then you can use get(myh1) and set(myh1,...) to get/set values of that figure.

Now the second group of commands;
load('MyColormaps');
set(0,'DefaultFigureColormap',mycmap);
clear;
This loads a file called "MyColormaps" within which I have saved a colormap, "mycmap" (creative, I know). You don't need this unless you are (like I am) highly unsatisfied with the default colormaps. I'll go over in the future how to make custom colormaps, but you can leave that out of your startup.m for now. Finally, I clear the variables "MyColormaps" has loaded in my workspace (I like having an empty workspace on startup).

I'm always interested in hearing about your tips and tricks when it comes to simplifying life in MATLAB / Mathematica, etc. Give a shout back if you have something you'd like to share.

Weekend Project - The Fountain of Youth

No, I haven't actually found The Fountain of Youth, sorry to disappoint. However we are youthful and we did make a fountain this weekend. Here's the recap of this rather easy weekend project:

Here's step 1: spray any of the pots that aren't waterproof with the waterproofing spray.
While that's drying (it took our brand 24 hours to dry), build a mesh fence to keep the rocks away from the pump - proper flow around the pump is ideal, most pumps have some built in spacing element, but we figured the more the better.
The bricks and mesh also help support the smaller pot, which will sit right on the spout.

We then placed the smaller pot on the spout and filled in the area with the stone pebbles. One of the asthetic things I really wanted was for water to fill the small pot and bubble out of it. When we first turned it on this didn't happen, the water came out of the fountain and then leaked through the hole in the bottom of the pot! We could have caulked up or cemented the hole, but being inclined to not make another trip to the hardware store, I just took a ziploc bag, cut a hole slightly smaller than the spout in it and forced it over the spout. After holding it down with a few rocks, it isn't 100% waterproof, but it slows down the leaking enough that the pot fills up and bubbles over.
 Of course, it would be nice if it were just this easy. However, after installing the first pump we turned the gadget on, and it whined like a banshee without pushing much water. So we drive back to the hardware store, return that pump and buy another one. Immerse this one in water, plug in and... enjoy the mechanical screeching sound. Now we've had enough of this hardware store, after returning the new banshee, we head to the other hardware store across town, find yet another pump, drive back, put this one in the water, and engage it at full speed to hear... gentle bubbling! Finally, the relaxing fountain we were looking forward to. Let this also be a lesson to try out the pump before fully building the fountain and rock around it.
 Here are another couple of pictures of the finished product. We can take off the fountain's bell attachment for even more soft bubbling sounds:

 Tools:
  • Wire cutters
Purchase breakdown:
  • Large tub
  • Small pot
  • Rocks
  • Pump
  • Wire mesh
  • Bricks
  • Can of sealant
Price:
  • Tools: $0 (Pliers and clippers help for the mesh)
  • Supplies: $127
  • Total: $127

Oobleck!

Here's a hands-on experiment that even the kids can try*.
  Oobleck (or corn starch in water) is a "Non-Newtonian fluid". When something tries to move through the oobleck, it tends to stiffen, and make it even more difficult for that object to move through. In the video below, sound waves from the speaker apply little pulses of pressure to the ooblek. Let's see what happens.
  When each pressure pulse (sound wave) is applied, the oobleck stiffens, and then relaxes when the pressure stops. This gives rise to the "fingers" of oobleck forming, then slowly wiggling around and breaking off. Look again at the video and watch the oobleck at the edges of the speaker. When the pieces break off and land on the part of the speaker that is not vibrating they stop stiffening and look almost like a normal liquid.
  Don't forget about the oobleck that's dripping off the edge too! It almost looks like a very thick syrup, similar to molassas. The same physics is happening here as well. As the oobleck slides down itself there's a force that causes it to stiffen up.
  Compare this behavior with plain water in a speaker cone (not responsible for musical tastes):
  Unlike oobleck, water doesn't get stiffer in the same way that oobleck does. If you have a bathtub full of water and you pull your hand through it it's difficult. That's the drag of water resisting you. Now if you drag your hand twice as fast it's just about twice as difficult. That's a Newtonian fluid, for those of you more advanced, it means that the drag of the water is linear in the rate of shear (how fast it flows over your hand).
   If we were to take our bathtub and fill it with oobleck (hypothetically, I wouldn't recommend doing this), we could pull our hand through it as well. Now if we were to drag our hand through it twice as fast, it resists us much more than twice as much. That is to say it gets stiffer as we increase the rate of shear, people call this dilatant.
  Alternatively we could imagine a material where if we were to pull our hand through twice as fast, it would actually be easier! This type of liquid gets softer as we go, or you may hear it as "shear thinning" or pseudoplastic.

  Oobleck is really a fantastically fun recipe and one that's so incredibly simple I really encourage you to do on your own: Mix 1 part water to 1.5 or 2 parts corn starch. Add some food coloring if you'd like. That's it!
  Another do-at-home non-Newtonian fluid recipe is that of Flubber.

*Always exercise caution when working with exposed electrical wiring, such as that which can be found in speakers, subwoofers, and other audio electronics. Children should always be supervised around electricity.