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.
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. \$\endgroup\$