Draw a Pentaflake Fractal screenshot

Draw a Pentaflake Fractal

Draw the Sierpinski pentagon: five copies at the golden-ratio scale, one per vertex, with a rotation control.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Runs in this tab

Five copies at the golden scale

The pentaflake is the five-fold Sierpinski polygon. A pentagon of circumradius r becomes five pentagons of radius r divided by one plus phi, where phi is the golden ratio, about 1.618. The scale is therefore about 0.382, and each child is centred r minus that radius from the middle along a vertex direction, so it touches the parent's vertex and leaves a small gap to its neighbours. That gap is the visible pentagon lattice.

Level n holds 5^n pentagons and the page draws every level, so depth five is 3,906 filled paths. That is the cap: at six it would be 19,531 paths, past what one frame can paint, and the gaps would be smaller than a pixel anyway.

Rotation turns the whole flake without changing the rule or the count. Depth and rotation are the only inputs, and the same pair always draws the same shape in the tab.

Draw a pentaflake: each pentagon becomes five smaller ones at a scale of 1/(1 + φ), with every level filled.

The golden ratio fixes the scale, so only the orientation changes between two drawings at the same depth.

How to use it

Set the depth and the rotation, then press Draw or Animate. Stop ends the animation, and the status line names the number of pentagons placed at the depth drawn.

The rule

Each pentagon produces five children at 1/(1 + φ) of the parent, which is about 0.618. That scale is what lets the children touch their neighbours without overlapping, and it comes from the golden ratio rather than a tuned number.

Where it stops

Depth is capped at 5, because each pentagon becomes five and every level is drawn, so depth 6 would be 19,531 filled paths for gaps the canvas cannot resolve. There is no export.

What to Expect

Best for

  • seeing the golden ratio appear in a fractal scale
  • producing a filled five-fold figure

What this tool keeps

  • The substitution and the fills run in this tab; nothing is uploaded and no image is stored.

Frequently asked questions

Where does the scale come from?

1/(1 + φ), the golden ratio's reciprocal, which is about 0.618. That is the scale at which five children touch their neighbours without overlapping.

What does rotation change?

Only the orientation of the finished flake. The scale, the child count and the depth are untouched.

Why is the depth capped at 5?

Because each pentagon becomes five and every level is filled: depth 6 would be 19,531 paths for gaps smaller than a pixel.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.