Fractals are shapes that contain copies of themselves on smaller and smaller scales. There are many of them in nature: ferns, trees, frost-flowers, ice-floes, clouds and lungs, for example. Fractals are also easy to create on a computer, because you all need do is take a single rule and repeat it at smaller and smaller scales. One of the simplest fractals follows this rule:
1. Take a line of length l and find the midpoint.
2. Erect a new line of length l x lm on the midpoint at right angles.
3. Repeat with each of the four new lines (i.e., the two halves of the original line and the two sides of the line erected at right angles).
When lm = 1/3, the fractal looks like this:
(Please open image in a new window if it fails to animate)
When lm = 1/2, the fractal is less interesting:
But you can adjust rule 2 like this:
2. Erect a new line of length l x lm x lm1 on the midpoint at right angles.
When lm1 = 1, 0.99, 0.98, 0.97…, this is what happens:
The fractals resemble frost-flowers on a windowpane or ice-floes on a bay or lake. You can randomize the adjustments and angles to make the resemblance even stronger: