The making of Twinkle Tux

This page documents how I built a penguin out of fairy lights…

Tux is the official mascot of the Linux operating system, to which I have made various contributions over the years. Tux was originally drawn by Larry Ewing, and looks something like:

The goal was to turn this into something which worked well with fairy lights poked through holes in a piece of MDF. I guess I was thinking of pointillism when I originally came up with the idea.

It seemed like a good idea, but the bit which worried me the most was to ensure that the image was clearly a penguin at the end of drilling several hundred holes in a big bit of dead tree. Being a software engineer, the obvious solution was to whip up something which could simulate Twinkle Tux.

Taking the image that I had in mind, I first needed to force it into the colors which were available to me from fairy lights (red, green, blue, and yellow in the set I wanted to use). I therefore wrote a program which generated a false color Tux, in my restricted palette. This is the code I came up with, if you care about such things. You should note that it’s a quick and dirty, not an example of good coding style.

My false color Tux looked like:

You can see that he’s clearly still a penguin. Next, this image is too big, so I used a command line tool called convert, from the ImageMagick suite, to shrink it. If you’re interested in ImageMagick, you should checkout my IBM DeveloperWorks article on the issue.

Here’s the tiny penguin I ended up with:

Now, this is not so clearly a penguin, so I used the GIMP to touch up the image. Here’s the small version, and a bigger one so you can see what I was doing…

You can see that this is where the border got added as well. Now, this doesn’t look all that impressive, but it looks better with fairy lights because they’re not square. The final coding step was to decide if this was going to be clearly a penguin when do with fairy lights. I therefore whipped up a fairy light simulator, complete with alpha blending. You can get the code here, with the same proviso as above, and noting that this code also needs my libmplot graphics library.

Here’s the simulation:

We should note that it’s mildly deceptive because it assumes that all colors of fairy lights are equally bright. This simulation also looks better if you step back from your monitor, which is a lot like standing at the far end of my driveway.

So, how many lights am I going to need? The simulation assures me:

Number of lights used: 707 (146 red, 178 green, 184 blue, 199 yellow)

That’s a lot of lights. 240 colored lights (60 of each color) costs $14.95 at Woolworths, but I need the right number of each color. In total, I need to buy 4 sets of colored outdoor fairy lights.

Finally, I needed a computer generated image to serve as the cutting pattern. A simple hack to the lights code gave me:

Now I could move onto the dead tree part of the process. To get the cutting pattern onto the wood, I used a mate’s video projector to project the picture above onto a big bit of paper taped to an old door in my garage.

I then laid this over a pre painted bit of MDF, and could start cutting. It became pretty clear that I needed to drill small pilot holes with the bit of paper — the larger holes destroyed the paper too quickly. After a couple of hours of drilling, and several worn out drill bits, I ended up with the finished wooden sheet.

You can see in the next pictures that I had some problems with the MDF flaking away on the back side of the wood. This caused some concern for a while, but it doesn’t seem to have been a major issue. Next time I wont use MDF.

Next I inserted the fairy lights, minus their globes. The lights are siliconed into place, which should hold them in nicely.

Next I inserted the globes, using the simulation above as a reference to what color to use where.

A last, I could actually see what the finished product would look like:

That picture was taken with Twinkle Tux on my workbench in the garage, with one of my sister in laws holding it up. Now to hang Twinkle Tux.

I ended up bolting Twinkle Tux to the front of the garage, which gives us the following pictures of it at it’s final resting place.