Posted by

kohsuke on June 8, 2009 at 10:34 PM PDT

JavaOne is always such a big week for me (and many of us) that I need a bit of time to unwind before I go back to my regular routine. So this year, I took on a little hobby project.

JavaOne is always such a big week for me (and many of us) that I need a bit of time to unwind before I go back to my regular routine. So this year, I took on a little hobby project.

My daughter is 4 year old now, and so I play with her with LEGO all the time. While building random things, I discovered that I enjoy building spheres, mainly because they are easy :-)

Then one day while I was playing with her, I thought that I could make a sphere much more smooth if I could make the studs pointing outward in all the directions (instead of just pointing upward like you normally do.)

I was thinking about how one could do this, but eventually figured out that I can basically do it the way a volleyball is assembled --- by combining 6 pieces of equal shapes around a cube.

So I first build a very small sphere in this way, by using pieces that I already have. I liked the result, so I wanted to make a bigger version. Then I thought, building it out of a single color is kind of boring, so, why don't make it a globe?

And since I'm a programmer, I hacked together a quick Java program to do this . First, a bit of geometric computation to figure out the shape of the 1/6-sphere.

Then I've expanded the program to compute the Miller cylindrical projection of the resulting LEGO sphere (3 pairs of 1/6-sphere are separately color coded.)

I can then overlay this into the Miller cylindrical projection of the earth to determine what color to put where.

I've also used a LEGO CAD software to virtually build this 1/6-sphere, so that I can figure out (roughly speaking) how many pieces of what kind I need all in all.

After all that preparation work, finally on Saturday after JavaOne, I started assembling it. My daughter pitched in a little, but this is still too small for her, so I built the most of it, and here's the result.

Unlike my early prototype, this globe is fully filled inside without any empty space. I built 8 pieces of 6x6x5 brick (because of the dimensions of a lego brick, this is the perfect cube), with 3 1x4 brick with studs on the side, so that when assembled together, the resulting cubic core has studs in all the directions. I'm actually not quite happy with the result, as many of the distinctive northern hemisphere coastal shapes are no longer visible, but Africa and South America are still quite recognizable.

I'm already thinking what if I build an even bigger globe — x1.5 or even x2 on every dimension. Hmm, maybe after next JavaOne...