Home Tools Blog About

Draw Triflake Fractal

In short

Draw a 120° L-system triangle fractal (axiom F+F+F, F → F-F+F). Space-filling dim 2.0. Free, offline, client-side, instant, secure.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

Renders an L-system curve from the closed-triangle axiom F+F+F with rule F → F-F+F at 120° turns. The default angle gives a space-filling curve (similarity dimension log(3)/log(√3) = 2.0). The name "triflake" is non-standard - see the FAQ for what this is and isn't.

🛡
100% PrivateNo server uploads, ever
InstantRuns in your browser
💧
No WatermarksClean output, always
🆓
Free ForeverNo accounts, no limits

How to Use Draw Triflake Fractal

Draw Triflake Fractal · free online tool · All Tools Verse
Draw Triflake Fractal. Free online tool that runs in your browser.
  1. Pick iterations (0-8). Closed-triangle base has 3 starting segments; each iteration triples them, so iter N has 3 × 3ᴺ segments.
  2. Set segment length and angle. Default 120° gives a space-filling curve; other angles produce non-canonical experimental figures.
  3. Pick a color and a gradient mode: none, linear (lightens along traversal), or radial (darker toward edges).
  4. Adjust line width (1-4 px).
  5. Optionally enable construction lines - draws a simple equilateral-triangle outline behind the curve as a visual reference.
  6. Click Draw Fractal or press Ctrl/Cmd + Enter. Iter 7+ shows a non-blocking time estimate.
  7. Copy or download the PNG.

Frequently Asked Questions

What does this tool actually draw?

It traces the L-system with axiom F+F+F (closed equilateral triangle at 120° turns) and rule F → F-F+F applied N times. Each F is “draw forward one unit”; + and − rotate the heading by the chosen angle. The default 120° produces a curve that’s a mirror variant of Knuth’s terdragon – a space-filling triangular curve, not a Koch-style frilly edge.

Is this the classical “triflake” or the Koch snowflake?

Neither. In n-flake terminology, “triflake” usually means the N=3 case of the polyflake family, i.e. the Sierpinski triangle (which uses area subdivision, not curve construction). The Koch snowflake, by contrast, uses 60° turns and the rule F → F-F++F-F. This tool uses 120° turns and a different rule, so it matches neither canonical form – it is a custom triangular L-system curve. The original FAQ called this “Minkowski sausage variant”, which is also inaccurate; the Minkowski sausage uses 90° turns and a 4-segment replacement rule.

What is the fractal dimension?

At the default 120° angle the similarity dimension is exactly 2.0 – the curve is space-filling. The Moran equation: 3 copies × (1/√3) to the d = 1 gives d = log(3)/log(√3) = 2. (Each F-F+F segment displaces √3 units net, verified by trace.) An older version of this tool claimed log(3)/log(2) ≈ 1.5850, which is the Sierpinski triangle’s dimension – pasted in by association with the word “triangle”. The code’s getFractalDimension() and the stats line both report 2.0000 now.

What if I change the angle?

Only 120° gives the named space-filling curve. Other angles produce a recognisable but non-canonical figure with different self-similarity properties – sometimes self-overlapping, sometimes open. The stats line labels these as “non-canonical angle N°” so you know you’ve left the named fractal.

What happened to the construction-lines bug?

The original construction-lines code scaled the base triangle by Math.pow(3, countSegments(lsystem)/3) – at iter 5 that’s Math.pow(3, 729/3) = 3^243, an astronomical number that drew nothing useful. The fix draws a simple equilateral-triangle outline at the curve’s bounding-box scale instead, which is what the feature was clearly meant to do.

Is anything sent to a server?

No. The tool loads three static files (HTML, CSS, JS) and then runs entirely in your browser – L-system expansion, 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.

Keep going

Related Tools

All Fractals tools →

Draw Canopy Fractal

Draw a canopy-tree L-system fractal in your browser. 7 iterations, custom colors, gradient depth,…

Draw Cantor Dust Fractal

Draw true Cantor Dust (4-corner) or Sierpiński carpet (8-square) in your browser. Color modes,…

Draw Cantor Fractal

Draw the Cantor set with middle-third deletion. 0-10 iterations, custom colors, dimension and measure…

Draw Flowsnake Fractal

Draw the Gosper curve hexagonal space-filling fractal in your browser. Iterations 1-6, custom colors,…

Draw Frosty Fractal

Draw Frosty Fractal online, free and private. Runs in your browser, no upload, instant…

Draw Hausdorff Fractal

Draw the Hilbert curve or Moore curve (closed-loop variant) - true space-filling fractals (dim…

Draw Heighway Fractal

Draw the Heighway dragon (paper-folding fractal) with fire gradient and symmetry modes. L-system based.…

Draw Hexaflake Fractal

Draw the hexaflake (hexagon snowflake) - 7-hexagon recursive fractal with 6-fold symmetry. Custom colors,…

Draw Hilbert Fractal

Draw the Hilbert space-filling curve in your browser. 9 iterations, rotation, gradient, endpoints. Free,…

Draw Koch Fractal

Draw Koch curve, snowflake, or anti-snowflake at any angle. Iterations 0-7. Free, offline, client-side,…

Draw Levy Fractal

Draw the Lévy C-curve (Paul Lévy 1938) - space-filling fractal at 45°. Gradient and…

Draw Mcworter Dendrite Fractal

Draw Mcworter Dendrite Fractal online, free and private. Runs in your browser, no upload,…

Share

Embed this tool

Add this free tool to your website. Copy and paste the code: