What is Sierpiński's Gasket?

Fine question. It is a fractal. Some people relate it to Pascal's triangle. Rather than regenerate all the details here, I suggest you check out this site at The University of Western Australia or the Wikipedia page. Of course, Google has a long list of sites.

What I like is that the figure appears as the result of a random process. Take a triangle with three equal sides (equalateral). Pick some point in the triangle and mark it. Pick one of the three vertices at random, go half way from your point towards that vertex, and call this your new point. Draw it. Repeat: pick a vertex, go half way towards it, call that your new point, draw it. What ends up emerging after a few thousand points is Sierpiński's Gasket. See the section of the University of Western Australia link above entitled "Chaos game" for a mathematical description of this process.

Sierpiński Gasket Generator

Size of picture: (50-2000)

Number of points: (0-max depends on size of picture)

zoom = 200
numpoints = 200

Personal History

A long time ago when I was in graduate school I took to writing Sierpinski's gasket generation programs as my first graphics program in each new computer language I learned. When you learn a new computer language your first program almost always does nothing more than print "Hello, World!". When I needed to write graphics in a new language, I started with Sierpinski's Gasket. I did this on what was at that time a wicked cool graphics display hooked up to a VAX using C. I wrote it in Postscript and printed on now ancient LaserWriters. I implemented it in Perl. I suspect I did some other versions that I have forgotten --- there is some memory left of a version in Awk that generated a LaTeX file that generated the graphics - that falls into the list of versions I would like to forget. Now PHP!

One interesting version was not a program. My wife was teaching 7th grade mathematics while I was in graduate school and just after. We put up a bulletin board covered with paper - 44 inches square. We drew the triangle with a different color at each vertex. The kids walked up, picked a color. They had to measure from the push pin halfway to the vertex of their choosen color then move the push pin and mark the old spot with a marker. After a week, Sierpinski's Gasket started to appear. Despite the one or two kids trying to "mess things up" and the mistakes in measuring. Quite fun.