Thursday, 10 January 2013

PYGAME- “Sierpinski Triangle”

           
             The Sierpinski triangle fractal was first introduced in  1915 by Waclaw Sierpinski , who described some of the triangle’s interesting properties .  The Sierpinski triangle is a geometric pattern formed by connecting the  midpoints of the sides of a triangle. It is at the s most  interesting and  simplest fractal shapes in existence. Because one of  the neatest things about Sierpinski's triangle is how many different and easy  ways there are to generate it . This is one of the basic examples of self-similar  sets, that is  it is a mathematically generated pattern that can be reproducible at any  magnification or reduction.

Construction


  1)  Start with any triangle in a plane. The canonical Sierpinski triangle uses a
       equilateral triangle with a base parallel to the horizontal axis

  2)  Connect the midpoints of each side to form four separate triangles, and  cut
        out the triangle in the center

  3)  Each of the three  remaining triangles, perform this same act








Formation after each iteration
-->

Tuesday, 8 January 2013

PYGAME- “ Koch Snowflake ”


 
-->
             Fractals are one example of "algorithmic art" . Here discussing about a particular kind of fractal known as the Koch Snowflake. A fractal is an image that keeps on repeating itself every new time it gets smaller and smaller. The snowflake is a fractal of the Koch curve. Helge von Koch who is responsible for the snowflake. He wrote about the fractal snowflake in a paper written in 1906. The most interesting part about a Koch snowflake is that when you continue this creating process the curve is infinitely long but has an finite area. This means the the sides of the snowflake are never ending but at the same time the area it encloses is only going to be 1.6 times bigger then the original area of the original triangle. 

-->

Design Steps


Constructing a Koch snowflake is a 
 step by step process.

Step1

Start with an equilateral triangle.

Step2


Split each side into three equal segments.

step3


Create an smaller equilateral triangle in the middle of the three parts from step 2

step4


Remove the line segment that is the base of the triangle from step 3

-->
              If you continue repeating this procedure, the curve will never self-intersect, and in the limit you get a shape known as the Koch snowflake. Each time you repeat the process this is call an iteration. To find the number of sides all you need to know is how many iterations you have completed.