Free online tools to generate, calculate,
convert, format, encode, and play.
 

Sierpinski Triangle Generator

Generate and visualize Sierpinski triangles with adjustable depth, colors, and line width. The Sierpinski triangle is a classic self-similar fractal formed by recursive triangular subdivision.


Preview

Controls

About Sierpinski Triangle

The Sierpinski triangle (also called the Sierpinski gasket or Sierpinski sieve) is named after the Polish mathematician Wacław Sierpiński, who described it in 1915. It is constructed by starting with a filled equilateral triangle, finding the midpoints of each side, and removing the central inverted triangle. This process is then repeated recursively for each remaining smaller triangle.

  • Hausdorff dimension: log(3)/log(2) ≈ 1.585, placing it between a one-dimensional line and a two-dimensional plane.
  • Self-similarity: Each of the three corner sub-triangles is an exact scaled copy of the whole fractal.
  • Pascal's triangle connection: If you shade the odd numbers in Pascal's triangle, the pattern that emerges approximates a Sierpinski triangle.
  • Chaos Game: Can also be generated by repeatedly plotting the midpoint between a random vertex and the current point.
  • Zero area: At infinite depth, the total removed area equals the original triangle area, leaving a set of measure zero.

Embed This Util

You can embed this util on your own site as a widget. Adding ?embed=1 to the URL loads a compact version with just the tool itself; no header, menu, or documentation. Paste this snippet into your HTML:


    

Copy snippet Adjust the height to taste.



Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with