# Sierpinski fractal

## World's simplest fractal tool

This utility lets you draw colorful and custom Sierpinski fractals. You can adjust the parameters of the initial triangle, such as its color and size, and generate as many fractal iterations from it as you want. The size can be specified by adjusting the width and height of the space where the fractal is constructed, as well as adjusting padding from the edges of the drawing area. You can also choose the direction which the vertex of the triangle will be pointing and specify the thickness of triangles' border. There are three colors you can adjust – color for the drawing space, triangles' border, and internal fill of triangles. Fun fact - if you write the binomial coefficients in a pyramid shape (Pascal's triangle shape) and color all odd numbers with black color and even numbers with white color, then the Sierpinski triangle will form. Fractabulous!

announcement
we've created devurls!

We just created another project – DEVURLS – world's simplest developer news aggragator. Check it out!

A link to this tool, including input, options and all chained tools.

Can't convert.

Sierpinski fractal tool
What is a sierpinski fractal?

This online browser-based tool allows you to create your own unique Sierpinski fractals. The Sierpinski fractal is one of the most popular fractals. Because of its triangular form and 3-fold symmetry, it's also known as Sierpinski triangle and it's constructed from the set of triangles. It was first created and researched by the Polish mathematician Wacław Franciszek Sierpinski in 1915, although the triangular patterns it creates had been encountered many centuries before. To get a Sierpinski fractal, you start with a solid triangle and in the first step of construction remove an inverted triangle from its center. You're left with three triangles. In the second step, you now remove three inverted triangles from the remaining three triangles. This process continues as long as necessary. The number of filled triangles at the nth iteration step is equal to 3ⁿ⁻¹, and their size is s×4¹⁻ⁿ, where s is the size of the initial triangle. The limiting shape has zero area but the sum of all triangle edges has infinite length. Mind blowing and ingenious at the same time, or as we love to say – fractabulous!

Sierpinski fractal examples
Click to use

Sierpinski Fractal from 27 Triangles

In this example, we generate a multi-colored Sierpinski fractal at its 4th iteration stage, which means that it's built from 3⁴⁻¹ = 3³ = 27 triangles. We draw the triangles in Daintree color, fill them with a bright turquoise color and use lavender-rose color for the canvas area of a size 600 by 600 pixels. We also set 10-pixel padding for the triangle.

**Required options**

Recursive depth of the fractal.

Width of the fractal.

Height of the fractal.

Drawing space's
background color.

Triangle edge color.

Triangle fill color.

Triangle edges' width.

Padding from the edges.

Inverted Sierpinski Fractal

This example uses a 2-pixel line to draw an upside-down Sierpinski triangle of depth 10. The tiny triangles in the bigger triangle aren't filled with any color and are transparent. Only their border in a tolopea color is drawn on a twilight blue canvas.

**Required options**

Recursive depth of the fractal.

Width of the fractal.

Height of the fractal.

Drawing space's
background color.

Triangle edge color.

Triangle fill color.

Triangle edges' width.

Padding from the edges.

Filled Sierpinski Fractal

In this example, we form a Sierpinski fractal from filled triangles that are all connected by their vertices. We've left the border color empty so there's no color used for drawing the edges of triangles. We illustrate the sixth recursion step and there are 3⁶⁻¹ = 3⁵ = 243 triangles, each 1024 times smaller than the original triangle.

**Required options**

Recursive depth of the fractal.

Width of the fractal.

Height of the fractal.

Drawing space's
background color.

Triangle edge color.

Triangle fill color.

Triangle edges' width.

Padding from the edges.

Pro tips
Master online fractal tools

You can pass options to this tool using their codes as query arguments and it will automatically compute output. To get the code of an option, just hover over its icon. Here's how to type it in your browser's address bar. Click to try!

https://onlinefractaltools.com/draw-sierpinski-fractal?&width=600&height=600&iterations=4&background-color=%23ff8ce8&line-segment-color=%23022129&fill-color=%2311cef5&line-width=5&padding=10&direction=up

All fractal tools

Quickly draw a custom McWorter dendrite fractal.

Quickly draw a custom canopy tree fractal.

Quickly draw a custom Gosper fractal.

Quickly draw a custom Z-order fractal.

Quickly draw a custom Hilbert fractal.

Quickly draw a custom binary v-fractal.

Quickly draw a custom Peano fractal.

Quickly draw a custom Heighway dragon fractal.

Quickly draw a custom twin dragon Heighway fractal.

Quickly draw a custom Heighway nonadragon fractal.

Quickly draw a custom Koch fractal.

Quickly draw a custom triflake fractal.

Quickly draw a custom Sierpinski triangle fractal.

Quickly draw a custom Sierpinski pentagon fractal.

Quickly draw a custom Sierpinski hexagon fractal.

Quickly draw a custom Sierpinski polygon fractal.

Quickly draw a custom Moore fractal.

Quickly draw a custom Cantor comb fractal.

Quickly draw a custom Cantor dust fractal.

Quickly draw a custom Levy fractal curve.

Quickly draw a custom ice fractal.

Quickly draw a custom Pythagoras tree fractal.

Quickly draw a custom t-square fractal.

Quickly draw a custom Hausdorff tree fractal.

Coming soon
These fractal tools are on the way

Generate a Hilbert Sequence

Walk the Hilbert fractal and enumerate its coordinates.

Generate a Peano Sequence

Walk the Peano fractal and enumerate its coordinates.

Generate a Moore Sequence

Walk the Moore fractal and enumerate its coordinates.

Generate a Cantor String

Encode the Cantor set as a string.

Mandelbrot Tree

Generate a Mandelbrot tree fractal.

Barnsey's Tree

Generate a Barnsley's tree fractal.

Barnsey's Fern

Generate a Barnsley's fern fractal.

Binary Fractal Tree

Generate a binary tree fractal.

Ternary Fractal Tree

Generate a ternary tree fractal.

Dragon Fractal Tree

Generate a dragon tree fractal.

De Rham Fractal

Generate a de Rham curve.

Takagi Fractal

Generate a Takagi-Landsberg fractal curve.

Peano Pentagon

Generate a Peano pentagon fractal curve.

Tridendrite Fractal

Generate a tridendrite fractal curve.

McWorter's Pentigree

Generate a Pentigree fractal curve.

McWorter's Lucky Seven

Generate a lucky seven fractal curve.

Eisenstein Fractions

Generate an Eisenstein fractions fractal curve.

Bagula Double V

Generate a Bagula double five fractal curve.

Julia Set

Generate a Julia fractal set.

Mandelbrot Set

Generate a Mandelbrot fractal set.

Toothpick Fractal

Generate a toothpick sequence fractal.

Ulam-Warburton Fractal

Generate an Ulam-Warburton fractal curve.

Subscribe!
Never miss an update

Cool!

Notifications
We'll let you know when we add this tool

Cool!