Construction
An algorithm for obtaining arbitrarily close approximations to the Sierpinski triangle is as follows:
Note: each removed triangle (a trema) is topologically an open set.
- Start with any triangle in a plane (any closed, bounded region in the plane will actually work). The canonical Sierpinski triangle uses an equilateral triangle with a base parallel to the horizontal axis (first image).
- Shrink the triangle to ½ height and ½ width, make three copies, and position the three shrunken triangles so that each triangle touches the two other triangles at a corner (image 2). Note the emergence of the central hole - because the three shrunken triangles can between them cover only 3/4 of the area of the original. (Holes are an important feature of Sierpinski's triangle.)
- Repeat step 2 with each of the smaller triangles (image 3 and so on).
Note that this infinite process is not dependent upon the starting shape being a triangle—it is just clearer that way. The first few steps starting, for example, from a square also tend towards a Sierpinski triangle. Michael Barnsley used an image of a fish to illustrate this in his paper "V-variable fractals and superfractals."
The actual fractal is what would be obtained after an infinite number of iterations. More formally, one describes it in terms of functions on closed sets of points. If we let note the dilation by a factor of ½ about a point a, then the Sierpinski triangle with corners a, b, and c is the fixed set of the transformation U U .
This is an attractive fixed set, so that when the operation is applied to any other set repeatedly, the images converge on the Sierpinski triangle. This is what is happening with the triangle above, but any other set would suffice.
If one takes a point and applies each of the transformations, and to it randomly, the resulting points will be dense in the Sierpinski triangle, so the following algorithm will again generate arbitrarily close approximations to it:
Start by labeling p1, p2 and p3 as the corners of the Sierpinski triangle, and a random point v1. Set vn+1 = ½ ( vn + prn ), where rn is a random number 1, 2 or 3. Draw the points v1 to v∞. If the first point v1 was a point on the Sierpiński triangle, then all the points vn lie on the Sierpinski triangle. If the first point v1 to lie within the perimeter of the triangle is not a point on the Sierpinski triangle, none of the points vn will lie on the Sierpinski triangle, however they will converge on the triangle. If v1 is outside the triangle, the only way vn will land on the actual triangle, is if vn is on what would be part of the triangle, if the triangle was infinitely large.
Or more simply:
- Take 3 points in a plane to form a triangle, you need not draw it.
- Randomly select any point inside the triangle and consider that your current position.
- Randomly select any one of the 3 vertex points.
- Move half the distance from your current position to the selected vertex.
- Plot the current position.
- Repeat from step 3.
Note: This method is also called the Chaos game. You can start from any point outside or inside the triangle, and it would eventually form the Sierpinski Gasket with a few leftover points. It is interesting to do this with pencil and paper. A brief outline is formed after placing approximately one hundred points, and detail begins to appear after a few hundred.
Or using an Iterated function system
An alternative way of computing the Sierpinski triangle uses an Iterated function system and starts by a point at the origin (x0 = 0, y0 = 0). The new points are iteratively computed by randomly applying (with equal probability) one of the following three coordinate transformations (using the so-called chaos game):
xn+1 = 0.5 xn
yn+1 = 0.5 yn; a half-size copy
This coordinate transformation is drawn in yellow in the figure.
xn+1 = 0.5 xn + 0.25
yn+1 = 0.5 yn + 0.5 ; a half-size copy shifted right and up
This coordinate transformation is drawn using red color in the figure.
xn+1 = 0.5 xn + 0.5
yn+1 = 0.5 yn; a half-size copy doubled shifted to the right
When this coordinate transformation is used, the triangle is drawn in blue.
Or using an L-system — The Sierpinski triangle drawn using an L-system.
bitwise AND - The 2D AND function, z=AND(x,y) can also produce a white on black right angled Sierpinski triangle if all pixels of which z=0 are white, and all other values of z are black.
bitwise XOR - The values of the discrete, 2D XOR function, z=XOR(x,y) also exhibit structures related to the Sierpinski triangle. For example, one could generate the Sierpinski triangle by setting up a 2 dimensional matrix, placing the uppermost point on, then cycling through the remaining cells row by row the value of the cell being XOR(,)
Other means — The Sierpinski triangle also appears in certain cellular automata (such as Rule 90), including those relating to Conway's Game of Life. The automaton "12/1" when applied to a single cell will generate four approximations of the Sierpinski triangle.
If one takes Pascal's triangle with 2n rows and colors the even numbers white, and the odd numbers black, the result is an approximation to the Sierpinski triangle. More precisely, the limit as n approaches infinity of this parity-colored 2n-row Pascal triangle is the Sierpinski triangle.
Read more about this topic: Sierpinski Triangle
Famous quotes containing the word construction:
“There is, I think, no point in the philosophy of progressive education which is sounder than its emphasis upon the importance of the participation of the learner in the formation of the purposes which direct his activities in the learning process, just as there is no defect in traditional education greater than its failure to secure the active cooperation of the pupil in construction of the purposes involved in his studying.”
—John Dewey (18591952)
“No construction stiff working overtime takes more stress and straining than we did just to stay high.”
—Gus Van Sant, U.S. screenwriter and director, and Dan Yost. Bob Hughes (Matt Dillon)
“Striving toward a goal puts a more pleasing construction on our advance toward death.”
—Mason Cooley (b. 1927)