Draw Pentaflake Fractal
Draw the pentaflake - 5-fold pentagon snowflake, scale 1/(1+φ), classical Sierpinski variant, dim ≈ 1.8617. Free, offline, client-side, instant, secure.
Renders the pentaflake (5-fold pentagon n-flake) via recursive
"1 center + 5 vertex" subdivision at scale 1/(1+φ) ≈ 0.382.
Similarity dimension log(6)/log(1+φ) ≈ 1.8617.
How to Use Draw Pentaflake Fractal
- Choose iterations (0-5). Real pentagon count =
(5ᴺ⁺¹ − 1) / 4, NOT5ᴺas the older version of this tool claimed. Iter 3 = 156 pentagons; iter 5 = 3,906. - Set base size (1-20). This is a multiplier; the tool auto-scales the result to fit the canvas with padding.
- Pick render mode. Outline reveals the geometric structure clearly; filled emphasizes area; both is the default and shows everything.
- Pick primary and secondary colors for alternating levels. Slate indigo + amber is the default. A toast warns if a color is too close to white.
- Adjust fill opacity (0-100%) when in filled or both mode. Lower opacity reveals overlapping layers.
- Set line width (1-4 px) when in outline or both mode.
- Pick canvas size (600 / 800 / 1000 px).
- Click Draw Fractal or press Ctrl/Cmd + Enter. Iter 4+ shows a non-blocking time estimate toast - no modal dialog interrupts you.
- Copy or download the PNG. Copy uses the clipboard API with a textarea fallback for older browsers.
Frequently Asked Questions
What is the pentaflake?
The pentaflake is a self-similar fractal with 5-fold rotational symmetry, built by recursively replacing every regular pentagon with 6 smaller copies arranged as 1 center pentagon plus 5 surrounding pentagons at the parent’s vertex directions. It is one of the simplest fractals to exhibit pentagonal symmetry – which is rare in classical tilings because regular pentagons do not tile the plane.
Why is the scale 1/(1+φ)?
φ = (1 + √5) / 2 ≈ 1.618 is the golden ratio. For the surrounding pentagons to fit naturally at the parent’s vertices, each must be scaled by 1/(1+φ) = 1/φ² ≈ 0.382 of the parent. This is the unique scale where the construction has clean self-similarity. The number 1+φ ≈ 2.618 is also φ² because of the identity φ² = φ + 1.
How many pentagons does iteration N produce?
The real count is (5 to the N+1, minus 1, divided by 4) – a geometric series, because each non-leaf level pushes 1 center pentagon and recurses 5 times for the surrounding ones. Iter 3 = 156; iter 4 = 781; iter 5 = 3,906. An older version of this tool’s stats reported 5 to the N (giving 125 at iter 3, 3,125 at iter 5) – that was wrong. The current stats line shows the real number.
What is the fractal dimension?
The classical pentaflake’s similarity dimension is log(6) divided by log(1+φ), which works out to about 1.8617. An older version of this tool’s code used the formula log(6) / log(2+φ), which gives about 1.394 – that was wrong (factor in the denominator was off). The current code computes the correct value. The number sits between 1 (a curve) and 2 (a filled region), which matches the visual impression of a “thick but not solid” snowflake.
Does the pentaflake actually tile the plane?
No – regular pentagons cannot tile the plane (the interior angle 108° does not divide 360 evenly), and this construction does not produce a true edge-sharing tiling either. The 5 surrounding pentagons are placed at the parent’s vertices, which leaves small visible gaps between the surroundings and the center. This is intentional – it is the “Sierpinski pentaflake” variant. A tighter tiling would require a different placement rule.
What does alternating colors show?
Each pentagon is tagged with the recursion level at which it was emitted (level 0 = leaf pentagons; level N = the very first center pentagon at the top of the recursion). Alternating by level mod 2 makes the hierarchy visible as concentric color rings – you can trace the layers like growth rings.
Is this implemented as an L-system?
No. An earlier version of the spec claimed this used an L-system with axiom “F++F++F++F++F” and a rewrite rule. That was inaccurate – the code uses direct recursive subdivision (push center, recurse 5 times). The misnamed L-system would not actually produce a pentaflake at all; it would produce a single pentagon. The spec has been corrected.
Is anything sent to a server?
No. The tool loads three static files (HTML, CSS, JS) and then runs entirely in your browser – pentagon generation, drawing, PNG export, clipboard copy. You can disconnect from the internet after the page loads. No analytics, no tracking, no cookies.
Is this tool free?
Yes – free, unlimited, no signup, no watermark. Use the PNGs in lectures, papers, blog posts, or art freely. Attribution to is appreciated but not required.