Thursday, 3 December 2015

The Sierpinski Traingle or Gasket

The Sierpinski Triangle is also called Sierpinski Gasket and Sierpinski Sieve.

A Sierpinski triangle or gasket can be constructed by recursively extracting triangular forms from within an original triangle. At each stage of recursion, three times as many triangles are extracted, each being a quarter of the area of those used in previous stage. This leads to another series, which can be summed to show that the total area extracted is equal to the area of the original triangle-no area remains, yet a set of points remains.
 This definition would be circular, if we did not have a base case at which to stop recursion. We shall say, therefore, that a very small Sierpinski gasket is just a very small triangle.

To make a large Sierpinski gasket:

==>Make a small Sierpinski gasket at one of the corners of the outer triangle.
==>Then move to another corner of the outer triangle and make another small Sierpinski gasket.
==>Then move to another corner of the outer triangle and make another small Sierpinski gasket.
==>Then return the turtle to the initial position and heading.

Program for generating a Sierpinski gasket:
 pi=22/7
SIERPINSKI(Level)
  IF Level=0, Poly(1,2*pi/3)
  OTHERWISE
    REPEAT 3 TIMES
        RESIZE 1/2
        SIERPINSKI(Level-1)
        RESIZE 2
        MOVE 1
        TURN 2*pi/3

Let N_n be the number of black triangles after iteration n, L_n the length of a side of a triangle, and A_n the fractional area which is black after the nth iteration. Then

N_n=3^n
L_n=(1/2)^n=2^(-n)
A_n=L_n^2N_n=(3/4)^n.

No comments:

Post a Comment