Sierpiński triangle

Compare corner subdivision and the seeded chaos game on the same equilateral triangle.

About this tool

Two methods reveal the same Sierpiński triangle. Recursion keeps the three corner triangles at each midpoint subdivision; the chaos game repeatedly moves halfway toward a randomly chosen corner.

  • Recursion: 0–9 steps. Step 0 is the filled equilateral triangle. At step n there are 3ⁿ triangles and (3/4)ⁿ of its original area remains. The area is a model value, not a raster measurement.
  • Chaos game: 1–300,000 plotted points and a text seed. The first 20 iterations are discarded before the requested points are collected. The same seed repeats the same sequence; an empty seed is valid. No finite-area result is inferred from point density.
  • The root side is 1 and its height √3/2. Both views use the same normalised coordinates. 3D inspection extrudes the recursive triangles to 3% of their side or shows the chaos points in the same plane, without random heights. It is not a tetrahedral fractal.
  • Colours indicate height. Drag in 3D to rotate, Ctrl/Meta+wheel to zoom; plain wheel scrolls the page. Changing the view or colours reuses the computed model. Resize/theme changes repaint it.
  • After the first drawing, valid edits update automatically. In 2D, drag to pan and Ctrl/Meta+wheel to zoom around the centre; plain wheel scrolls the page. Reset restores the fitted view in either display. Hover over Steps for the remaining model area. PNG exports the current view with relevant parameters. Only your input values and drafts are retained, not computed triangles, point clouds or camera views. Fine details remain limited by display resolution.