Neil's News

Snowflakes

18 December 2004

Every Christmas a small flurry of paper snowflakes arrives in the post from my Aunt Sandi in Canada. Each year the designs get more imaginative and the geometries get more elaborate.

Think about it for a moment. One takes a folded piece of paper, carefully cuts seemingly random shapes out of it, then when unfolded it deterministically transforms into a complex shape that may or may not have been what one intended. If one really messes up, a piece can unexpectedly fall out during the unfolding. This should strike a chord with the programmers reading this. A programmer writes what would seem to most people to be random lines of text, then the program is compiled and the resulting execution may or may not do what was expected. If one really messes up the compile fails or the execution dumps core. Granted, snowflakes aren't Turing-complete (at least I don't think they are), but the skill sets involved are surprisingly similar.

Here's a Java applet I wrote which allows one to prototype these constructions. Yup, it's a CAD tool for paper snowflakes.

View the source code.

One of the features is the ability to change from the traditional six-pointed shapes to any other regular 2D geometry. This got me thinking about what it would mean to have, say, a five-pointed snowflake. I believe I'm correct in thinking that the 120° crystal geometry of ice stems from the tetrahedral arrangement of electrons in the outer orbital shell of the Oxygen atom within each water molecule. Thus in order to get different numbers of points, one would have to crystalize something other than water. I wonder how many points a methane snowflake has? Maybe we'll find out soon; Huygens is scheduled to start its landing on Titan next week.

While on the subject of paper constructs, here's one I designed a few months ago.

Update:
The snowflake editor provoked some rather confusing feedback. Eventually it dawned on me that people weren't realising that one could draw on it. That would be my fault; it was blindingly obvious to me since I'd just programmed it, but there were no visual clues that would indicate to others what was expected. Bad interface design. The applet's been tweaked so that the cursor changes to a drawing cross when it's over the main area.

< Previous | Next >

 
-------------------------------------
Legal yada yada: My views do not necessarily represent those of my employer or my goldfish.