This is a recipe for your making your own fractal shape at home. Take a piece of paper (or a patch of computer screen). Pick three points on the paper; these will be the corners of the triangle. Number them 1, 2, 3. Pick any other point on the paper or screen. Now, roll 1d3, or somehow generate a random integer number of 1, 2, or 3 (with equal probability). Make a point at the midpoint of the line between your old point and the corner of the triangle indicated by your random selection. Now use that point as your starting point for the next roll of the die. Iterate. You will generate a space-filling form of a triangle, with the central quarter removed, and the central quarter removed from each remaining sub-triangle, and so on ad infinitum. This is one example of an iterated function system. (Other similar designs will generate the image of fern leaves.)

There is now an implementation of the above algorithm available in PostScript.

I used to make these on my notebooks in high school. I'm so glad there's a node for them. The only thing I feel should be added is that this continuing shape (where you draw little triangles out from the middles of the sides of the big one, with their sides 1/3 the length of the original, and then repeated that operation over and over again) is one of few examples of an infinite line enclosing a finite area. If you draw a circle around the original triangle, the continuous figure you end up drawing will never enclose more space than that circle, and yet the line around the outside of the figure is infinite in length, as long as you keep generating it by adding more little triangles to the sides. It always approaches the amount of area tha the circle has, but it'll never get there. It's asymptotic.

Thanks for the node; you got my vote.
Here it is in all its ASCII glory:
.
. .
.   .
. . . .
.       .
. .     . .
.   .   .   .
. . . . . . . .
.               .
. .             . .
.   .           .   .
. . . .         . . . .
.       .       .       .
. .     . .     . .     . .
.   .   .   .   .   .   .   .
. . . . . . . . . . . . . . . .
.                               .
. .                             . .
.   .                           .   .
. . . .                         . . . .
.       .                       .       .
. .     . .                     . .     . .
.   .   .   .                   .   .   .   .
. . . . . . . .                 . . . . . . . .
.               .               .               .
. .             . .             . .             . .
.   .           .   .           .   .           .   .
. . . .         . . . .         . . . .         . . . .
.       .       .       .       .       .       .       .
. .     . .     . .     . .     . .     . .     . .     . .
.   .   .   .   .   .   .   .   .   .   .   .   .   .   .   .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Should I continue?

One way to get an approximation of a Sierpinski triangle is to look at the first 2n rows of Pascal's triangle modulo 2 (that is, draw a black pixel for every odd number, and a white pixel for every even number. It's amusing to work out why this must be true (you could start by showing that C2n-1,k is always odd).

An interesting thing to try is to run the same algorithm as above, except use more than three points. If you run a program with a square, it will just fill up solid. Same with a hexagon. However, any figure with an odd number of sides will give a picture with forbidden areas, much like the triangle does. The area of these forbidden spaces decreases with respect to the total area of the object as you add more and more points. The limit of applying a Sierpinksy type operation to a circle will give a solid circle.

Other fun things to try are fixing the coordinates of two points constant and allowing the third to be some random point within a range of 2-D space. Also try doing four points, where three are the vertices of a triange and the fourth is a point inside the triangle. These all came from a science project I did in highschool many years ago using a Commodore 64 and the LOGO programming language =)

Not to repeat halcyon, but using increasingly more points actually adds to the dimension of the figure:

Two points makes a line segment.

Three points makes a triangle with triangular gaps (see w/u by just a guy above).

Four points makes a tetrahedron with octehedral gaps (an octehedron bounded by a triangle, the shape 'removed' from the center of the tetrahedron below):

                                       ,|,
                                     ,7`\,\,
                                   ,7`  `| `\,
                                 ,7`     \,  `\,
                               ,7`       `|    `\,
                             ,7`          \,     `\,
                           ,7`            `|       `\,
                         ,7`               \,        `\,
                       ,7`                 `|        /7`\,
                     ,7`                    \,      AV `|`\,
                   ,7`'TTs.,                `|     /7   \, `\,
                 ,7` \\,  `'TTs.,            \,   AV    `|   `\,
               ,7`   `|`\,     `'TTs.,       `|  /7      \,    `\,
             ,7`      \, `\,        `'TTs.,   \,AV       `|      `\,
           ,7`        `|   `\,        ,7``'TTs`|7         \,       `\,
         ,7`           \,    `\,    ,7`      ,7\\,        `|         K`
       ,7`             `|      `\,,7`      ,7` `|`\,       \,       AV
     ,7`                \,       AV'TTs.,,7`    \, `\,     `|      /7
   ,7`                  `|      /7     ,7`      `|   `\,    \,    AV
  ,T,                    \,    AV    ,7`         \,    `\,  `|   /7 
  `'TTs.,                `|   /7   ,7`           `|      `\, \, AV
       `'TTs.,            \, AV  ,7`              \,       `\||/7
            `'TTs.,       `|/7 ,7`                `|         `AV
                 `'TTs.,   \,,7`                   \,        /7
                      `'TTs`|                      `|       AV
                           `'TTs.,                  \,     /7
                                `'TTs.,             `|    AV
                                     `'TTV.,         \,  /7
                                          `'TTs.,    `| AV
                                               `'TTs.,\/7
                                                    `'T`

The shape from the middle:


                                       ____,,..----**/7,
                       ____,,..----**'`             AV`|
                     |'TTs.,                       /7  \,
                     \,   `'TTs.,                 AV   `|
                     `|        `'TTs.,           /7     \,
                      \,            `'TTs.,     AV      `|
                      `|                 `'TTs./7        \,
                       \,                    ,7\,        `|
                       `|                  ,7`  `\,       \,
                        \,               ,7`      `\,     `|
                        `|             ,7`          `\,    \,
                         \,          ,7`              `\,  `|
                         `|        ,7`                  `\, \,
                          \,     ,7`                      `\||
                          `|   ,7`              ____,,..----**
                           \,,7`____,,..----**'`
                            7*'`

(In the above figure, each face of the tetrahedron is a Sierpinski triangle, and every 3D gap is octehedral in shape.) It is clear from the upper shape above that four generating points could easily fill the quadrilateral formed by them if the points are randomly placed (percentage chances? I have no idea...).

Etc. A three dimensional screen would be more suited for viewing this fractal with four generating points, but the 2-D version is often recognizeable. Also, it often helps to have a color change when approaching any one of the points.

See Also:

Pascal's Triangle.

Log in or register to write something here or to contact authors.