**Fractals** are formed by repeating a process again and again, where **each output influences the next input**. They are also **self-similar** to some extent.

Fractals are found all around us. From the wriggly coast lines, snowflakes, to cauliflower and broccoli. Fractals are a quite new field of research, stemming from the need to explain the patterns found in nature. They are also used in image compression. As computers are getting smaller, engineers have developed a coolant network inspired by our own blood network (also an example of a fractal) which can be etched into a silicon-chip. Above all…making fractals is really fun

Even simple steps make really beautiful and complex fractals……

A famous example is the **Koch snowflake**. The steps to make one are as follows:

First draw an equilateral triangle. Then:

- Divide each side into thirds
- Make another equilateral triangle on each of the 3 middle thirds
- Repeat 1 and 2 on the newly created triangles

The final pattern (wherever you wish to stop this never-ending repetitive process) resembles a snowflake.

However, the fractal (called **Sierpinski gasket**) I experimented with, has a different and slightly longer set of steps. They are as follows:

First draw a triangle. Choose a random point in the triangle. Then:

- Choose a random vertex from the 3 vertices of the triangle
- Make a dot halfway between the chosen vertex and the chosen point.
- The position of the made dot becomes the next chosen point
- Repeat 1, 2 and 3 on the same triangle

Smaller dots and repeating the process longer will give a finer detail.

Why don’t you try making your own set of steps?* (Just keep in mind that the previous outcome must influence the next input)*

I also tried making my own fractals. I just tweaked the above fractals steps a bit.

First draw a triangle. Choose a random point in the triangle. Then:

- Choose a random vertex from the 3 vertices of the triangle
- Make a dot at one-third the distance between the chosen vertex and the chosen point.
- The point that is halfway between the chosen vertex and the chosen point becomes the next chosen point
- Repeat 1, 2 and 3 on the same triangle

Though the output doesn’t itself become the input, it influences the next input, making it a fractal.

Changing the fraction of the distance (halfway in the first triangle fractal and one third in the second triangle fractal) changes the output quite a bit. As the fraction becomes smaller, like one-seventh or one eight, the triangles within the original triangle become very tiny.

My code for the above fractals is at: https://github.com/pranit-goel/fractals. It also has code for making a square fractal.