Staaarter

Generate a Koch Polyflake

Generates our extension of the Koch curve construction, the same triangular outward-bump rule used by the Koch snowflake, applied to a regular hexagon base instead of an equilateral triangle. Adjust the Iterations input from 0 to 5 and export the result as SVG or PNG. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-08-05
By Staaarter Team
fractalgeneratorsvg

Overview

Introduction

The Koch snowflake's defining trick, replace every straight segment with a small outward bump, doesn't actually depend on starting from a triangle. This tool applies that same rule to a regular hexagon instead, producing a rounder, denser variation on the familiar Koch silhouette.

It's our own extension of the classic construction to a new base polygon, built for anyone curious how the Koch rule looks starting from more sides, rather than a reproduction of an established, separately-named fractal.

What Is Generate a Koch Polyflake?

A fractal curve formed by starting with a regular hexagon and repeatedly applying the same Koch rule used by the Koch snowflake, replace every straight segment with 4 shorter segments arranged so the middle two form an outward-pointing bump, to every side.

It uses the identical bump geometry and 60-degree turning angle as the classic Koch star, just starting from 6 sides instead of 3.

How Generate a Koch Polyflake Works

The tool starts from the outline of a regular hexagon, six straight segments. At each iteration, every straight segment in the current outline is replaced with 4 new segments, the first third, an outward bump made of two segments meeting at a 60-degree point, and the final third, exactly the same replacement the Koch star uses.

This replacement is applied simultaneously to every segment in the shape, so the number of segments quadruples with each iteration while each new segment is a third the length of the one it replaced.

Repeating this down to the chosen Iterations count produces an increasingly detailed, spiky hexagonal outline, with the curve traced as a single connected path.

When To Use Generate a Koch Polyflake

Use it when you want the Koch bump rule's texture applied to a rounder, six-sided starting silhouette instead of the classic triangle, for generative art or visual comparison against the standard Koch star.

If you need the textbook Koch snowflake specifically, use Koch Star Generator, or if you want the bumps folded inward, use Koch Anti-snowflake Generator.

Features

Advantages

  • Uses the exact same, well-understood Koch bump rule as the classic snowflake, just on a different starting polygon.
  • The hexagon base gives a rounder, denser silhouette than the triangle-based Koch star at the same iteration count.
  • Clean single-path outline rendering makes the increasing detail at each iteration easy to follow.

Limitations

  • Not a separately named, documented fractal, it's our own extension of the Koch construction to a hexagon base.
  • Iterations is capped at 5, one lower than the Koch star and anti-snowflake tools, since the hexagon's 6 starting sides produce more total segments at each iteration.

Examples

Iterations 3 Koch polyflake

Input

Iterations: 3

Output

A spiky, roughly circular outline, the regular hexagon's six sides each replaced with 3 rounds of outward Koch bumps.

Every one of the segments from iteration 2 is replaced with 4 shorter segments including a new outward bump.

Best Practices & Notes

Best Practices

  • Start at Iterations 1 or 2 to see how the hexagon base changes the silhouette compared to the triangle-based Koch star.
  • Use the SVG export if you plan to scale the curve up significantly, the vector path stays crisp at any size.

Developer Notes

Built on the shared L-system turtle engine using the "koch-polyflake" preset: axiom `F+F+F+F+F+F` (a regular hexagon traced with 60-degree exterior turns) and the identical production rule `F -> F-F++F-F` used by the "koch-star" preset, at the same 60-degree turning angle. Starting from 6 sides instead of 3 means the total segment count at any given iteration is double the Koch star's, which is why `maxIterations` is capped at 5 here instead of 6 for the triangle-based presets.

Generate a Koch Polyflake Use Cases

  • Generative art exploring how a fractal bump rule changes when applied to different base polygons
  • Visual comparisons against the classic Koch star to illustrate that the Koch rule generalizes beyond triangles
  • Educational material on L-systems, showing how changing only the axiom (not the rule) changes the resulting fractal

Common Mistakes

  • Referring to this as a standard, separately-documented fractal, it's our own extension of the Koch construction, built by swapping the starting polygon from a triangle to a hexagon.
  • Expecting the same Iterations range as Koch Star Generator, this tool tops out one iteration lower because the hexagon starts with twice as many sides.

Tips

  • Compare this tool with Koch Star Generator at the same Iterations value to see exactly how the starting polygon changes the final silhouette.
  • Download the SVG and zoom into one of the six original hexagon edges to see the self-similar bump structure directly.

References

Frequently Asked Questions