Sierpinski Triangle

Generate, interact with, and export the Sierpinski triangle fractal gasket online. Supports recursive subdivision depths 1 through 8, custom triangle and background colors, touch pan and pinch zoom gestures, and clean vector SVG and raster PNG downloads.

Private • In-browser processing • Zero server uploads

Interactive workspace loading...

How to Use Sierpinski Triangle

1
Select Subdivision Depth
Use the depth slider (1 to 8) to choose the triangle recursion density.
2
Customize Colors
Pick your favorite triangle fill color, stroke outline, and background color.
3
Interact & Inspect
Touch or drag on the canvas to inspect fine self-similar geometric patterns.
4
Export Image or SVG
Click Download or Copy to obtain your graphic as PNG or vector SVG.

Key Features

Recursive Geometric Subdivision
Subdivide equilateral triangles down to 8 recursion levels in real-time.
Dual Scalable Export
Download infinitely scalable vector SVG markup or high-res PNG image files.
Touch & Pan Support
Smooth touch drag and pinch-to-zoom controls for mobile and desktop screens.
Safe Recursion Guard
Limits recursion to safe thresholds to preserve 60 FPS client responsiveness.

Common Use Cases

  • Fractal geometry education, demonstrating self-similarity, Hausdorff dimension ($\approx 1.585$), and Pascal's triangle modulo 2.
  • Fractal antenna design and radio frequency engineering for multi-band telecommunications.
  • Procedural art, digital wallpapers, and geometric print design.
  • Vector silhouettes for laser cutting, plotting, and screen printing.

Frequently Asked Questions

The Sierpinski triangle (or Sierpinski gasket) is a fractal and attractive fixed set with the overall shape of an equilateral triangle, subdivided recursively into smaller equilateral triangles. It was described by Polish mathematician Wacław Sierpiński in 1915.

At subdivision depth $d$, the gasket contains $3^{d-1}$ triangles (with depth 1 having 1 triangle, depth 2 having 3, depth 3 having 9, up to depth 8 with 2,187 solid triangles).

Because doubling the scale factor quadruples the perimeter while tripling the area, its Hausdorff fractal dimension is $\frac{\ln(3)}{\ln(2)} \approx 1.58496$.