Triflake Fractal Generator
A triangular fractal (triflake) pattern. Customize and download as PNG.
Generate a Triflake fractal — a recursive triangle pattern related to the Koch snowflake — by setting iteration depth, color, and canvas size, then export the result as a PNG. Each iteration triples the triangle count, so you go from a simple shape to thousands of interlocking pieces in a few clicks. And everything runs in your browser. Nothing gets uploaded.
How It Works
The Triflake starts with a single triangle. Each iteration replaces every triangle with three smaller ones arranged in a Koch-like pattern — same idea as a Sierpinski triangle but with the pieces rotated outward. The generator calculates all vertex coordinates recursively and draws them onto an HTML canvas element. Higher iterations mean exponentially more triangles, which is why things slow down past iteration 8 or 9.
Examples
Quick Logo Background
You need a geometric background for a tech meetup poster. Something eye-catching but not distracting.
Iterations: 4
Color: #2563eb
Size: 800×800Clean blue Triflake PNG
800×800px, transparent-ready
~50KB file sizeMath Class Demonstration
A teacher wants to show students how fractal complexity grows with each iteration, stepping from 1 to 6.
Iterations: 1 through 6
Color: #000000
Size: 600×600 each6 separate PNGs showing
progression from simple
triangle to dense fractal
(3 → 9 → 27 → 81 → 243 → 729 triangles)High-Res Print for Wall Art
Someone wants a large-format fractal print. They need maximum detail at 2000px.
Iterations: 7
Color: #7c3aed
Size: 2000×2000Detailed purple Triflake
2000×2000px PNG
2187 triangles rendered
~200KB fileWho Uses This
Generate geometric patterns for posters, album covers, and brand assets without firing up Illustrator.
Show students how recursion and self-similarity work with a visual that changes in real time.
Grab quick fractal PNGs for placeholder graphics, loading screens, or generative art experiments.
Use Triflake shapes as base layers in Photoshop compositions or texture overlays.
Common Mistakes
Iteration 9 or 10 means thousands of triangles. Your browser tab will freeze or crash. Start at 4–5 and work up gradually — you can always re-render.
Rendering 7 iterations on a 200×200 canvas squishes all that detail into a blurry mess. If you want high iterations, bump the size to at least 800px so the fine structure actually shows up.
A dark fractal on white looks fine here, but might clash with your dark-themed site. Export the PNG and test it against your real background before committing to a color scheme.
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
- Iteration Range: 1–10 (recommended 4–7 for best balance)
Frequently Asked Questions
What is a Triflake fractal?
A Triflake is a fractal built by recursively subdividing triangles in a Koch-like pattern. Think of it as the triangular cousin of the Koch snowflake — each iteration replaces one triangle with three smaller rotated copies. The result is a shape with infinite perimeter but finite area, which is the kind of thing that makes fractals so strange and interesting.
How many iterations should I use?
For most uses, 4 to 7 iterations hits the sweet spot. Below 4, the shape is too simple to look like a proper fractal. Above 7, render times climb sharply and the extra detail is not visible unless you’re printing at poster size. Start at 5 and adjust from there.
Can I use the downloaded fractal commercially?
Yes. The PNG you download is generated entirely in your browser from mathematical coordinates. There is no copyright on a mathematical shape, so you’re free to use it in logos, prints, merch, or whatever else you have in mind.
Why does my browser slow down at high iterations?
Each iteration triples the number of triangles. At iteration 8 you’re drawing 6,561 shapes; at iteration 10, that jumps to 59,049. The Canvas API handles this all on your CPU, so older machines or tabs with lots of memory usage will start to chug. Close other tabs and try again, or drop the iteration count by one.
Is the Triflake the same as a Sierpinski triangle?
They are related but not identical. A Sierpinski triangle removes the center of each triangle, leaving three smaller copies. A Triflake rotates and repositions the sub-triangles outward in a Koch snowflake style. The Sierpinski gets sparser with each step; the Triflake gets denser and more snowflake-like. Different vibe entirely.