Quadraflakes, Pentaflakes, Hexaflakes and more
Here in the UK we have had more snow than we have seen in over 20 years and as a country we are struggling with it to say the least. I have friends in places such as Finland who think that all this is rather funny…it takes nothing more than a bit of snow to bring the UK to its knees.
Anyway…all this talk of snow reminds me of a Wolfram Demonstration I authored around Christmas time called n-flakes. It started off while I was playing with the so called pentaflake which was first described by someone called Albrecht Dürer (according to Wolfram’s Mathworld). To make a pentaflake you first start of with a pentagon like this one.
Your next step is to get five more identical pentagons and place each one around the edges of the first as follows
The final result is the first iteration of the pentaflake design. Take a closer look at it….notice how the outline of the pentaflake is essentially a pentagon with some gaps in it?
Lets see what happens if we take this ‘gappy’ pentagon and arrange 5 identical gappy pentagons around it – just like we did in the first iteration.
The end result is a more interesting looking gappy pentagon. If we keep going in this manner then you eventually end up with something like this
Which is very pretty I think. Anyway, over at Mathworld, Eric Weisstein had written some Mathematica code to produce not only this variation of a pentaflake but also another one which was created by putting pentagons at the corners of the first one rather than the sides. Also, rather than using identical pentagons, this second variation used scaled pentagons for each iteration. The end result is shown below.
Looking at Eric’s code I discovered that it would be a trivial matter to wrap this up in a Manipulate function and produce an interactive version. This took about 30 seconds – the quickest Wolfram demonstration I had ever written. After submitting it (with due credit being given to Eric) I got an email back from the Wolfram Demonstration team saying ‘Why stop at just pentagons? Could you generalise it a bit before we publish it?’
So I did and the result was named N-flakes which is available for download on the Wolfram Demonstrations site. Along with pentaflakes, you can also play with hexaflakes, quadraflakes and triflakes. One or two of these usually go by slightly different names – kudos for anyone who finds them.