Introduction to Fractals

A fractal is a geometric figure, each part of which has the same statistical character as the whole. If the replication is exactly the same at every scale, it is called a self-similar pattern. The Sierpinski Gasket, shown on the right of this page, is an example of a self-similar fractal.


Scroll down to learn more about fractals.







Notice how the overall figure is made up of three identical figures that are half of its width and height.











Alternatively, it can be said that the overall figure is made up of nine identical figures that are a fourth of its width and height. Or even 27 identical figures that are an eigth of its width and height.











We can keep on saying that the figure is made of many more and much smaller identical figures, but it is more practical to say that the fractal is made with the the least and largest iterations. Which in this case is just three identical figures at half the width and height.











Building a Fractal

To build a self-similar fractal, we need to start with an image. In this tutorial we will use a square. In general, it does not matter what image you start with.

We then manipulate the image by giving it commands. We can give the image 5 different commands.


Please note that in this mini-tutorial, we will use the full cartesian coordinate system, that is, we will use both a positive and negative x-axis as well as both a positive and negative y-axis.

However, normally when making fractals we will only use the positive cartesian coordinate system, that is we will only use the positive x-axis and the positive y-axis. Anything outside of the positive cartesian coordinate system will not be seen.











Command 1a: We can scale down the width of the image on the x-axis.

Here we show an example of the image's width being scaled down by 0.5















Command 1b: If we scale the image's width by a negative number, then the image's width is scaled down AND flipped on the y-axis. That is, the new image is a reflection of the original image.

Here is an example of the image's width being scaled down by -0.5, that is, the width is scaled-down to half again, but the image is now reflected on the y-axis.















Command 2a: We can scale down the height of the image on the y-axis.

Here we show an example of the image's height being scaled down by 0.5















Command 2b: If we scale the image's height by a negative number, then the image's height is scaled down AND flipped on the x-axis. That is, the new image is a reflection of the original image.

Here is an example of the image's height being scaled down by -0.5, that is, the height is scaled-down to half again, but the image is now reflected on the x-axis.















Command 3: We can rotate the image counter-clockwise. Rotation always happens on (0,0) axis and are measured in degrees.

Here we rotate the image by 45 degrees.















Command 4a: We can move the image to a coordinate on the x-axis. Horizontal movement always starts on x = 0, so it does not matter if the image was flipped or rotated.

Here we move the image, scaled-down by half, to the right by 0.5















Command 4b: Here we again scale down the image by half, but this time we scale down the image's width by -.5. We then move the scaled-down image to the right by 0.5















Command 5a: We can move the image to a coordinate on the y-axis. Vertical movement always starts on y = 0, so it does not matter if the image was flipped or rotated.

Here we move the image, scaled-down by half, upwards by 0.5















Command 5b: Here we again scale down the image by half, but this time we scale down the image's height by -.5. We then move the scaled-down image upwards by 0.5















The commands are given to the image in the same order that they were presented:

  • First we scale-down the image.
  • Then we rotate the image.
  • And then we move the image to new (x,y) coordinates.














Example #1

The Sierpinski gasket that we showed earlier is created by giving an original image three different sets of commands.















The first set of rules are:

Scale-Width: 0.5

Scale-Height: 0.5

Rotation Angle: 0 degrees

X-Coordinate: 0.0

Y-Coordinate: 0.0















The second set of rules are:

Scale-Width: 0.5

Scale-Height: 0.5

Rotation Angle: 0 degrees

X-Coordinate: 0.5

Y-Coordinate: 0.0















The third and final set of rules are:

Scale-Width: 0.5

Scale-Height: 0.5

Rotation Angle: 0 degrees

X-Coordinate: 0.0

Y-Coordinate: 0.5















We then iterate this pattern 10 times to see the outcome















The Sierpinski Gasket shows that we don't need a particularly complex algorithm to make a beautiful fractal. In fact, the algorithm needed to make the Sierpinski Gasket only uses three rules















Example #2

It turns out we make a large number of fractals with just three rules. Try to figure out how to make this fractal before looking at the rules.















The first set of rules are:

Scale-Width: -0.5

Scale-Height: 0.5

Rotation Angle: 90 degrees

X-Coordinate: 0.5

Y-Coordinate: 0.5















The second set of rules are:

Scale-Width: 0.5

Scale-Height: 0.5

Rotation Angle: -90 (or 270) degrees

X-Coordinate: 0.5

Y-Coordinate: 0.5















The third and final set of rules are:

Scale-Width: 0.5

Scale-Height: 0.5

Rotation Angle: 0 degrees

X-Coordinate: 0.0

Y-Coordinate: 0.5















We then iterate this pattern 10 times to see the outcome















Now try to make a few of your own. Try to replicate the below example. If you want to learn more about fractals, then please visit Michael Frame's website. He was the amazing person who introduced me to fractals. If you want an even more in depth look into fractals, then check out his book (co-written by Amelia Urry) "Fractal Worlds"

















Create Fractal Rules

Now try to create your own: