25
1
First of all ... I would like to wish everyone a Merry Christmas (sorry if I am a day late for your timezone).
To celebrate the occasion, we are going to draw a snowflake. Because the year is 2015 and Christmas is on the 25th (for a large portion of persons), we will draw a Pentaflake. The Pentaflake is a simple fractal composed of pentagons. Here are a few examples (taken from here):
Each Pentaflake has an order n. The Pentaflake of order 0 is simply a pentagon. For all other orders n, a Pentaflake is composed of 5 Pentaflakes of the previous order arranged around a 6th Pentaflake of the previous order. For example, a Pentaflake of order 1 is composed of 5 pentagons arranged around a central pentagon.
Input
The order n
. This may be given in any way except that of a predefined variable.
Output
An image of the order n
Pentaflake. Must be at least 100px wide and 100px long. It may be saved to a file, displayed to the user, or outputted to STDOUT
. Any other form of output is not allowed. All image formats existing before this challenge are allowed.
Winning
As codegolf, the person with the least number of bytes wins.
3-1 because snowflakes only have 6 fold symmetry! =D – flawr – 2015-12-25T16:30:18.987
@flawr According to this article only about .1% of snowflakes actually have 6-fold symmetry ... or any symmetry at all. However, those snowflakes that do have symmetry can have 3-fold symmetry in addition to 6-fold symmetry :P
– TheNumberOne – 2015-12-26T14:27:02.4504
Well this article only studied way less than .1% of all snowflakes, and it is meaningless anyway, as they only studied american snowflakes. I bet metric snowflakes are way more symmetrical! (PS: Beautiful images! Snowflake #167 is especially interesting!) (I just noticed that metric snowflakes must have 10-fold symmetry.)
– flawr – 2015-12-26T14:30:41.510Is it necessary to have a self-contained function as an answer? I could shave off a few bytes if matlab scripts are also allowed (i.e. just a sequence of commands rather than a function). I'll edit according to this, and revert if it's not OK after all. – Andras Deak – 2015-12-27T00:01:59.967
1It will be okay as long as it outputs using one of the above methods. However,
n
cannot be predefined in your script file. You can readn
fromSTDIN
, prompt it from the user, take it as a function / commad line argument ... basically anything you want except for directly embedding it in your code. – TheNumberOne – 2015-12-27T00:20:28.3931Don't want to +1 this because it has 25 :( – The_Basset_Hound – 2016-01-06T03:23:40.167