|
||
The Sierpinski triangle is a fascinating mathematical structure that exhibits a property known as self-similarity. It begins with a simple equilateral triangle. Within this triangle, a smaller, inverted triangle is removed from the center, leaving behind three smaller triangles arranged in a triangular pattern. Each of these smaller triangles then undergoes the same process recursively. The process to construct the Sierpinski triangle can be visualized step by step. First, you start by drawing a large equilateral triangle. Next, you identify the center of this triangle and remove a smaller, inverted triangle of exactly half the scale. This action results in three smaller equilateral triangles surrounding the removed space. The process is repeated for each of the three remaining triangles. At each iteration, a smaller inverted triangle is removed from the center of every triangle left in the structure. This process continues infinitely, generating a complex pattern with an increasing number of smaller triangles. The result of this iterative process is the Sierpinski triangle, a fractal that contains infinitely many self-similar triangles, meaning that any part of the structure looks like the whole when magnified. The fractal's recursive nature demonstrates the concept of infinite detail and is a classic example of how simple rules can create complex patterns. This structure has applications in various fields, including computer science, art, and nature, due to its visual appeal and mathematical properties. Don't worry if you don't understand this explanation. It is hard to explain this only in words. Let me try to explain this in step by step illustration. Simpliy put, if you iterate the following steps over and over with a triangular paper and scissors, you would have the shape as shown in the plot at the end of this page. Instead of using paper and scissors, you can draw the same shape in mathematical way as illustrated below. If you iterate the following steps over and over, and mark all the position that you have gone through, you will get the shape shown at the end of the page. This is the image (a fractal shape) that can be obtained from the iteration of the procedure illustrated above. Following is the Octave/Matlab code that implements the procedure explained above and produce the above image. v = [0,0;0.5,0.7;1,0]; Nv = 20000; x1 = 0.0; y1 = 0.5;
vList = [x1,y1];
for i = 1:Nv vidx = randi([1 3]); vsel = v(vidx,:); x2 = vsel(1); y2 = vsel(2); x = (x2+x1)/2.0; y = (y2+y1)/2.0; vList = [vList;x y]; x1 = x; y1 = y; end;
plot(vList(:,1),vList(:,2),'bo','MarkerSize',1); If you change the shape of the first triable by changing the vertices of the triangle and repeat the same procedure explained above, you would get the fractal image as shown below.
|
||