Draw a Multiflake Fractal
Draw a Sierpinski-style polygon fractal: choose three to eight sides and each polygon spawns one copy per vertex.
One rule, any number of sides
Pick a polygon with p sides between three and eight. Every polygon of circumradius r is replaced by p copies of radius r/2, each centred halfway to a vertex, so the copies touch their neighbours. At three sides that is exactly the Sierpinski triangle rule; at four it is a four-fold flake, and the same rule carries through to eight. Level n holds p^n polygons.
The depth cap is computed rather than fixed: the largest depth whose deepest level stays under twenty thousand polygons, and never more than six. That ceiling binds at three to five sides; at six sides and above the twenty-thousand budget is reached first, so the cap drops to five and then four. Each polygon is a separate filled path, which is why the budget is a count rather than a size.
The side count and the depth are the only inputs, and both are whole numbers. The same pair always draws the same flake; nothing is random and nothing is uploaded.
Draw a multiflake for a polygon with the number of sides you choose, where every copy sits halfway to a vertex at half the radius.
Change the side count and the same rule makes a different flake; the depth cap is derived from the side count rather than fixed.
How to use it
Set the number of sides and the depth, then press Draw or Animate. Stop ends the animation, and the status line names the polygon count at the depth drawn for that side count.
The rule
Each copy sits halfway to a vertex at half the radius, so it touches its neighbour. That contact is what gives the figure its gap-free look, and it is why a triangle, a square and a hexagon produce visibly different flakes.
Where it stops
The count is p^n for p sides, so the cap is the largest depth that stays under 20,000 at the deepest level and is never more than six. The page reports which cap applies to the side count you chose.
What to Expect
Best for
- seeing one rule produce a triangle, square and hexagon flake
- comparing how side count changes density
What this tool keeps
- The placement and the drawing run in this tab; nothing is uploaded and nothing is stored.
Frequently asked questions
Why does the depth cap change with the side count?
Because the count is p^n for p sides. The cap is the largest depth under 20,000 copies at the deepest level, and never more than six, so a triangle allows a deeper flake than a hexagon.
What makes the flakes touch?
Each copy sits halfway to a vertex at half the radius. That placement makes neighbours touch, which is the rule behind the gap-free look.
Is the rotation random?
There is no rotation input and no seed: the placement is fixed by the side count and the depth, so the same inputs draw the same flake.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.