designcoding
About Table of Contents Keywords Monthly Archive
Support designcoding!

Sierpinski Triangle

February 20, 2024 | Algorithms
#fractal #grasshopper #polygon #sierpinski

Today’s computational curve is the beautiful Sierpinski Triangle. It is a fractal named after the Polish mathematician Waclaw Sierpinski, who described it in 1915, though it had been previously described by other mathematicians. It is a self-replicating pattern that arises from a simple recursive process. To construct the fractal, you start with an equilateral triangle and then repeatedly remove smaller equilateral triangles from its interior, leaving holes. Each iteration involves dividing each triangle into four smaller triangles and removing the middle triangle. Then, you repeat this infinitely. The Sierpinski triangle exhibits self-similarity, meaning that it looks the same at any magnification or scale. It is a fascinating example of how simple rules can lead to complex and beautiful patterns in mathematics.

Sierpinski Triangle animation

This Grasshopper definition generates the Sierpinski Triangle and its improvizations with several input parameters. The number of iterations, initial radius, thickness of the lattice, and evaluation parameters are the user-controlled inputs. So, you can generate the original Sierpinski Triangle and several deformed variations of them by playing with the inputs. The outputs are a planar surface and closed polylines of the resulting lattice. Therefore, it is ready to be laser-cut. I made the definition with the help of the Anemone iteration components. So, you need to install it to be able to use the definition.

Sierpinski Triangle Grasshopper definition
Sierpinski Triangle fractal, grasshopper
Grasshopper 1.0 definition (GH)Download

Cite this post

Yazar, T. (2024, February 20). Sierpinski Triangle. designcoding. Retrieved December 3, 2026, from https://www.designcoding.net/sierpinski-triangle/

Related Posts

Polygon Fractals with Rhino Python

August 2, 2017

We will see a simple Rhino Python exercise here. I called these Polygon Fractals (or Pentaflakes sometimes). It is both educational and fun to play with them. In Rhino, it can be a good exercise for basic CAD commands and transformations such as move, copy, and scale, and precision drawing operations such as object snapping. Also, in Grasshopper, it can be a good challenge for looping. In Rhino Python, it is already a good exercise for understanding Python and the…

Hexagonal Star Pattern

November 14, 2026

Sharing the latest scary pattern from my old pattern archive. This time, instead of using Parakeet, I designed it using only standard Grasshopper components. We start with a hexagonal grid. We exploded the cells of this grid and found the midpoint of each edge. By connecting these midpoints, we again created closed polylines. Then, we exploded these closed polylines, turning them into a sequence of data lists. Next, we place a point on each exploded segment (reparameterized with a t-value…

Emergent Polygons Revisited

November 14, 2026

15 years ago today, on my older son Mete’s 5th birthday, I started writing the designcoding.net blog. My first post was titled “Emergent Polygons.” Back then, I had just started learning a new language called Grasshopper. I was working on defining emergent polygons, one of the key issues in the theory of Shape Grammars, using Grasshopper. I updated the GHX code to GH and re-posted it in 2024. Now, exactly 15 years and exactly 600 posts later, Mete turned 20…

Star Lattice

May 15, 2023

This is the six-pointed star lattice definition in Grasshopper. The definition is generating CNC or laser-ready results as seen below. In this code, first, I developed a common star pattern by exploding a hexagonal grid. The tricky part of this definition is the last part. There, you can see how you can use the Region Union (RUnion) component to add thickness to a pattern we have drawn before. The operation here will require trimming and extending commands under normal conditions….

Emergent Polygons

November 14, 2011

This is my first post in designcoding, dated 14.11.2011. I revisited the code and decided to re-publish it in 2024. Hello World! This is the Emergent Polygons definition, one of the first Grasshopper studies I made while learning the language. This is a very efficient programming language for designers and architects since it utilizes geometric relationships very intuitively. I think it will be more popular and widely used in the upcoming years. Last year, I started my experiments on this….

  • Chapters

    • Algorithms
    • Discourses
    • Escapes
    • Fabrications
    • Studios
  • Explore

    • Table of Contents
    • Monthly Archive

    • All Keywords
    • #pattern
    • #rhino-python
    • #polyhedra
    • #vector-field
    • #interlocking
    • #parakeet
    • #sphere
    • #design-education
    • #calculus
    • #attractor
    • #kuka-prc
    • #robot
    • #lace
    • #facade
    • #wave
    • #frege
    • #gauss
    • #voronoi
    • #laser-cutting
    • #fibonacci
  • Search

  • Support designcoding!

  • Enjoying designcoding? Support me on Patreon to keep it growing. Thank you!

  • copyright 2026 designcoding.net | about | privacy policy | end user license agreement