Go HomeScience Home
SCarab's Sierpinski Gaskets

The Sierpinski gasket is a fractal pattern made up of an infinite number of triangles. There are very many ways of constructing it. One such way is to begin with an equilateral triangle, completely filled in. Then, cut out the central triangle: the triangle formed by drawing lines between the midpoints of each of the original trialgle's edges. Then, cut out the central triangles out of each of the remaining triangles. Repeat this process forever, and you've got a Sierpinski gasket. (picture will be here, eventually)

Another way of generating exactly the same pattern is to again start with an equilateral triangle. Then, pick any point inside that triangle. Draw a dot there. Then, put a new dot at a point double the distance from the nearest vertex of the triangle along a line connecting the starting point and that vertex. (picture will be here, eventually). If your starting point was on the Sierpinski gasket, your ending point will always stay inside your original triangle, and you will most likely fill in the entire Sierpinski gasket pattern. If not, your point will eventually go outside of the triangle, and get further and further away forever.

Both of these methods give you a view of the entire pattern, but it is impossible to see the full detail of it, since each would take an infinite number of iterations to reveal the whole pattern. But there is another method which, in a way, is like looking at an infinitely small piece of the whole pattern, so you can never "zoom out" enough to truly see the whole thing. However, since the pattern repeats itself on all scales, any of these methods shows you enough to know what the whole pattern is like at every scale. This other method is remarkably easy to calculate, and is based on yet another mathematical construct, Pascal's triangle. So before explaining the method, I'll write a few words about this structure.

Pascal's triangle is an interesting construction, in part because it is connected to so many different mathematical ideas. It is constructed like this: start with a row with just a single 1 on it (assuming that there's nothing, or zeroes, everywhere else). To make the following row, add the number above and to the left of your new spot to the nubmer above and to the right. Repeat forever. A bit of this process is shown below:

       1
      / \
      1 1
     /\ /\
    1  2  1
   /\ / \ /\
  1  3   3  1
 /\ / \ / \ /\
1  4   6   4  1


It turns out that this is exactly the same as the coefficients of (1+x)n:
when n is zero, this gives 1.
When n is 1 this is 1 + 1·x.
When n is 2, this expands to 1 + 2·x + 1·x2
When n is 3, this expands to 1 + 3·x + 3·x2+ 1·x3
etc.

In order to make it easier to type, and since it's easier to program a computer for arrays that are nice, easy grids, I'll skew this to the left: instead of adding (above and to the left) to (above and to the right), I'll say: add (above and to the left) to above, giving:

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
etc.

The way to create the Sierpinski gasket from this is to ask of each number in the triangle: is it odd or even? If odd, write it as a 1. If even, write it as a 0. This gives:

1
1 1
1 0 1
1 1 1 1
1 0 0 0 1
1 1 0 0 1 1
1 0 1 0 1 0 1
1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 1
1 1 0 0 0 0 0 0 1 1
1 0 1 0 0 0 0 0 1 0 1
1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 0 0 0 1 0 0 0 1
1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
etc.

The pattern of 1's and zeroes is beginning to emerge; it is even easier to see if the 1's are replaced by black dots, and 0's are left empty; or else use L's and spaces, as I've done below:

L
LL
L L
LLLL
L   L
LL  LL
L L L L
LLLLLLLL
L       L
LL      LL
L L     L L
LLLL    LLLL
L   L   L   L
LL  LL  LL  LL
L L L L L L L L
LLLLLLLLLLLLLLLL
etc.

There are many variations on this theme which are possible. One such modification (which I thought of on my own, then found out that others had already done a great deal with it) is to realize that this idea isn't limited to even/odd. Asking whether a nubmer is even or odd is essentially the same as asking whether or not it is evenly divisible by 2. If yes, put a zero. If not, write down the remainder (1). So it's also possible to do the same thing, but asking whether or not the nubmer is evenly divisible by 3, 4, 5, or whatever. If yes, put a zero. If not, write down the remainder. If each number in the remainder is assigned a different color, interesting patterns may be made. (picture will appear here, eventually)

This is essentially what I've done with the computer program mentioned on my computer pages. But I plan to allow other modifications which I've never read about. If anyone out there knows if such things have already been done, I'd appreciate an e-mail.

The first of these is to use the same rule as Pascal's triangle (adding the one above to the one above and to the left), but instead of starting with a single 1 on the first row, allow other patterns. Many possible first lines will give exactly the same thing as the Sierpinski gasket, except with the very top cut off. This is because each line only depends on the one immediately above it, so if a row appears anywhere in the Sierpinski gasket, the rest of the pattern below will be the same. So a starting line of 1, 11, or 101 will all produce a Sierpinski gasket. 111 is the first variation which doesn't. The pattern generated from this looks almost identical to the standard Sierpinski gasket except the very smallest triangles are different. Similar minor changes are found for 11111 (5 ones), 1111111 (7 ones), etc.

A more significant variation produces more interesting patterns. In this scheme, I still use the same Pascal's triangle rule, and start from a single 1 on the first line, but instead of assuming that everything outside of the pattern is a zero, I allow the leftmost column to be varied manually. That is, instead of having the leftmost column be all 1's (from assuming the one "above and to the left" is zero), I "seed" this left edge with some set of 1's and zeroes. Again, if this left edge is the same as any column in the Sierpinski gasket, it will produce the same thing as the standard gasket, but with some portion of the left edge cut off. So I've been looking at relatively simple patterns which are different. The most interesting so far is a repeating cycle of 3 ones followed by 3 zeroes. This produces large triangles much like the normal Sierpinski gasket, but some of them are filled as densely as this rule allows. That is, if you had a first row that was all ...110110110110110110110110... then every following row would have that same pattern but offset by 1 place:

... 110110110110110110110110 ...
... 101101101101101101101101 ...
... 011011011011011011011011 ...
... 110110110110110110110110 ...
A significant piece of this pattern is given below, in my "L's and spaces" format:
L
LL
L L
 LLL
 L  L
 LL LL
LL LL L
L LL LLL
LLL LL  L
   LL L LL
   L LLLL L
   LLL   LLL
L  L  L  L  L
LL LL LL LL LL
L LL LL LL LL L
 LL LL LL LL LLL
 L LL LL LL LL  L
 LLL LL LL LL L LL
LL  LL LL LL LLLL L
L L L LL LL LL   LLL
LLLLLLL LL LL L  L  L
       LL LL LLL LL LL
       L LL LL  LL LL L
       LLL LL L L LL LLL
L      L  LL LLLLLL LL  L
LL     LL L LL     LL L LL
L L    L LLLL L    L LLLL L
 LLL   LLL   LLL   LLL   LLL
 L  L  L  L  L  L  L  L  L  L
 LL LL LL LL LL LL LL LL LL LL
LL LL LL LL LL LL LL LL LL LL L
L LL LL LL LL LL LL LL LL LL LLL
LLL LL LL LL LL LL LL LL LL LL  L
   LL LL LL LL LL LL LL LL LL L LL
   L LL LL LL LL LL LL LL LL LLLL L
   LLL LL LL LL LL LL LL LL LL   LLL
L  L  LL LL LL LL LL LL LL LL L  L  L
LL LL L LL LL LL LL LL LL LL LLL LL LL
L LL LLLL LL LL LL LL LL LL LL  LL LL L
 LL LL   LL LL LL LL LL LL LL L L LL LLL
 L LL L  L LL LL LL LL LL LL LLLLLL LL  L
 LLL LLL LLL LL LL LL LL LL LL     LL L LL
LL  LL  LL  LL LL LL LL LL LL L    L LLLL L
L L L L L L L LL LL LL LL LL LLL   LLL   LLL
LLLLLLLLLLLLLLL LL LL LL LL LL  L  L  L  L  L
               LL LL LL LL LL L LL LL LL LL LL
               L LL LL LL LL LLLL LL LL LL LL L
               LLL LL LL LL LL   LL LL LL LL LLL
L              L  LL LL LL LL L  L LL LL LL LL  L
LL             LL L LL LL LL LLL LLL LL LL LL L LL
L L            L LLLL LL LL LL  LL  LL LL LL LLLL L
 LLL           LLL   LL LL LL L L L L LL LL LL   LLL
 L  L          L  L  L LL LL LLLLLLLLLL LL LL L  L  L
 LL LL         LL LL LLL LL LL         LL LL LLL LL LL
LL LL L        L LL LL  LL LL L        L LL LL  LL LL L
L LL LLL       LLL LL L L LL LLL       LLL LL L L LL LLL
LLL LL  L      L  LL LLLLLL LL  L      L  LL LLLLLL LL  L
   LL L LL     LL L LL     LL L LL     LL L LL     LL L LL
   L LLLL L    L LLLL L    L LLLL L    L LLLL L    L LLLL L
   LLL   LLL   LLL   LLL   LLL   LLL   LLL   LLL   LLL   LLL
L  L  L  L  L  L  L  L  L  L  L  L  L  L  L  L  L  L  L  L  L
LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL
L LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL LL L
...
I think you can see that a rather striking pattern does indeed emerge.

Again, there's no need to restrict the pattern to odd/even; it can be found with any base. My program can also handle this problem, and I've found bases 2, 3 and 6 to give especially interesting-looking patterns.

Here's an example of the base 6 pattern:
sierpsix.gif

I find these patterns interesting to look at, and find it fascinating that they would come from such a simple rule, one which is mathematically interesting for quite a few different reasons.


Go HomeScience Home