Pentaflake Fractal Generator
A pentagonal fractal formed by subdividing pentagons. Customize and download as PNG.
Generate pentaflake fractals — those recursive pentagon patterns where each shape splits into six smaller copies at every level. Set your iteration depth, pick a color, and the fractal renders onto a canvas you can save as PNG. The math behind it uses golden ratio scaling (1/φ² ≈ 0.382) to fit each sub-pentagon perfectly.
And everything runs in your browser. Nothing gets uploaded.
How It Works
The algorithm starts with a single regular pentagon. At each iteration, it replaces that pentagon with six smaller ones — five arranged around the outside edges and one nested in the center. The scaling factor is 1/(1+φ), where φ is the golden ratio (~1.618). After the recursion finishes, the coordinates get drawn onto an HTML5 canvas. You grab the PNG straight from there.
Examples
Quick Logo Background
You need a geometric pattern behind a math club logo. Something that looks intricate but doesn't take forever to generate.
Iterations: 3
Color: #1e3a5f
Canvas: 800×800
216 pentagons rendered
Clean, mid-detail fractal
PNG download ready
High-Detail Poster Print
For a math department hallway poster, you want maximum detail at large size. Iteration 5 gives you 7,776 pentagons — enough to fill a 2000px canvas with crisp geometry at any viewing distance.
Iterations: 5
Color: #7c3aed
Canvas: 2000×2000
7,776 pentagons
Highly detailed fractal
Render time: ~2-4 seconds
Comparing Iteration Depths Side by Side
Teaching self-similarity? Render iterations 1 through 4 in the same color and line them up. Students can count how 6^n gives the pentagon total at each level.
Iteration 1 → 6 pentagons
Iteration 2 → 36 pentagons
Iteration 3 → 216 pentagons
Iteration 4 → 1,296 pentagons
4 PNG files showing
progressive fractal growth
Perfect for slides or handouts
Who Uses This
Generate visual aids for lessons on self-similarity, recursion, and the golden ratio.
Create geometric backgrounds and patterns for posters, covers, and social media.
Grab quick fractal PNGs for placeholder art, generative design projects, or canvas API experiments.
Visualize recursion depth and pentagon count growth (6^n) for homework and presentations.
Common Mistakes
Iteration 6 means 46,656 pentagons. On older hardware this can freeze the browser tab for 10+ seconds. Start at 3 or 4, check the result, then bump it up if your device handles it fine.
At iteration 5 on a 200×200 canvas, the smallest pentagons are sub-pixel. You won't see the detail you're paying for in render time. Match canvas size to iteration depth — 800px minimum for iteration 4, 1500px+ for iteration 5.
Light gray fractal on a white canvas? It'll look blank in the PNG. Use a color with strong contrast against white, or change the background color first.
Technical Details
- Processing: 100% client-side (Canvas API)
- Browser Support: Chrome, Firefox, Safari, Edge
- Max Canvas Size: 2000×2000 pixels
- Export Format: PNG with transparency support
- Geometry: Recursive pentagon subdivision using golden ratio scaling (1/φ² ≈ 0.382)
Frequently Asked Questions
What is a pentaflake fractal?
A pentaflake is a fractal built from pentagons. You start with one regular pentagon, then replace it with six smaller pentagons — five around the edges and one in the center. Repeat that process at each scale, and you get a shape with fivefold symmetry that looks the same no matter how far you zoom in.
How many iterations should I use?
For most uses, 3 to 5 is the sweet spot. Iteration 3 gives 216 pentagons — enough to clearly see the fractal pattern. Iteration 5 produces 7,776 and looks great on large canvases. Going above 6 is possible but can slow down older browsers significantly.
What's the connection between pentaflakes and the golden ratio?
The golden ratio (φ ≈ 1.618) is baked into regular pentagons — the ratio of diagonal to side equals φ. In a pentaflake, each smaller pentagon is scaled down by 1/(1+φ), which works out to about 0.382. That's why the geometry fits together so perfectly without gaps or overlaps.
Can I use the generated fractal commercially?
Yes. The fractal is generated by your browser from a mathematical algorithm — there's no copyright on the output. Use it in logos, prints, merchandise, or whatever you need. The PNG you download is yours.
Why does my fractal look blurry at high iterations?
Small canvas + high iteration count means the tiniest pentagons are smaller than a single pixel. The fix is simple: increase the canvas size. For iteration 5, use at least 1500×1500 pixels. That gives the smallest shapes enough room to actually render as distinct pentagons.