Tuesday, October 29, 2013

What are fractals?

Fractals have come up as an important question two times before the invention of computers. The first time was when British map makers discovered the problem with measuring the length of Britain's coast. On a zoomed out map, the coastline was measured to be 5,000 something or other. Sorry, I've forgotten the units. But anyway, by measuring the coast on more zoomed in maps, it got to be longer, like 8,000. And by looking at really detailed maps, the coastline was over double the original. You see, the coastline of Britain that's on a map of the world doesn't have all the bay's and harbors. A map of just Britain has more of these, but not all the little coves and sounds. The closer they looked, the more detailed and longer the coastline got. Little did they know that this is a property of fractals? (A finite area, aka Britain, being bounded by an infinite line)
The second instance of pre-computer fractals was noted by the French mathematician Gaston Julia. He wondered what a complex polynomial function would look like, such as the ones named after him (in the form of z^2 + c, where c is a complex constant with real and imaginary numbers). The idea behind the formula is that you take the x and y coordinates of a point, and plug them into z in the form of x + y*i, where i is the square root of negative one, square this number, and then add c, a constant. Then plug the resulting pair of real and imaginary numbers back into z, run the equation again, and keep doing that until the result is greater than some number. The number of times you have to run the equations to get out of its "orbit" can be assigned a color and then the pixel (x,y) gets turned that color, unless those coordinates can't get out of their orbit, in which case they're made black.
Later, Benoit Mandelbrot, an employee of IBM, thought about writing a program with a formula such as, oh... maybe Z*(n)^2 + c, and then running it on one of IBM's many computers. And they eventually got some pretty pictures. Mandelbrot was the first person to get computers do the many repetitive calculations to make a fractal look good. And now you know the mathematical aspects of fractals.
The basic concept of fractals is that they contain a large degree of self similarity. This means that they usually contain little copies of themselves buried deep within the original. And the also have infinite detail. Like the costal problem, the more you zoom in on a fractal, the more detail (coastline) you get. And this keeps going on forever and ever, so you could make a pretty movie of a fractal zooming in. Or two. So far I've made a Mandelbrot Zoom (1.1 meg) and a Julia Set Zoom (784 k). Both are AVI files, but I'm planning on converting them to streaming video or something.

Fractal Dimensions
One of the unique things about fractals is that they have non-integer dimensions. That is, while you are in the 3rd dimension, looking at this on a flat screen which can be considered more or less the 2nd dimension, fractals are in between the dimensions. Fractals can have a dimension of 1.8, or 4.12. Although fractals may not be in integer dimensions, they always have a smaller dimension than what they're on. If you make a fractal by drawing lines that obey a certain rule, like Koch's Curve, that fractal can't have a dimension higher than the paper it's drawn on, which would be 2 (it can be assumed that paper is as good as we're gonna get to 2 dimensional. Don't give me a hard time.)
And how exactly does one calculate how many dimensions a fractal has? Well, its tricky, which is why I took so long writing this page. First off, you must realize that in math, dimension means much more than whether it's a point, or if it's flat, or if it has length, width, and height. Dimension has been dummed up for the public so they could enjoy their 3D movies and the like. With this in mind, we can continue.
This can be simplified with logarithms. (Not an oxymoron) If, for instance, you take cube and multiply its edge length by 2, then you can fit 8 of the old cubes into the new cube. Taking these two numbers, you can find that log 8 / log 2 equals three. (I've cut out the math that leads to this simple equation). So, a cube has a dimension of 3, which we already knew. Eight is also 2 raised to the 3rd power. Not a coincidence.
It can be assumed that for any fractal object (of size P, made up of smaller units of size p), the number of units (N) that fits into the larger object is equal to the size ratio (P/p) raised to the power of d, which is called the Hausdorff dimension.-or-

Let's try this for Koch's Curve. Using only line segments that are 3 centimeters long (P), you make a simple Koch's Curve, which is just a Star of David. 12 segments, 3 centimeters per segment. If you take that to the next level and use line segments which are 1 centimeter long (p), you use 48 line segments. By cutting the length of the line segments by one third (P = 3, p = 1, P/p = 3), the number of line segments used (N) goes up four times (48 segments for p divided by 12 segments for P equals 4). That means N = 4, P/p = 3, so d = log 4 / log 3. Using a little help from a calculator, we find that Koch's Curve has a dimension of 1.2618595071429 Amazing but true.    

Uses of FractalsWhat good are mathematical pictures that aren't even whole dimensions? Well, they're pretty. As mentioned before, nature is full of fractal-like stuff. Twigs on trees look like the branches which they grow on, which look like the tree itself. Its the same thing with fern leaves, and so many other living things. Remember that artist who made paintings by splashing and dribbling paint onto a canvas? Even though it looks like a mess, his paintings, especially the later ones, look good. You can't place your finger on why, but I'd bet that you wouldn't mind one hanging up on your wall. The reason his paintings "look good" is that their fractal dimension is close to that of nature's, especially in the later paintings. So, when we see these paintings, they look natural, even if they're just spashes of paint.
Anyway, self-similarity is part of this world, so fractals can make pretty good copies of it. Artists have created very realistic looking landscapes composed of just a few fractal equations. Using just FractInt I've made not-so-bad looking mountains and even a moon, which looks more like one of the moons of Jupiter, but a moon none the less.

Fractals also have technological applications. Antennas have always been a tricky subject. Many antenna engineers have been reduced to using trial and error because of the complex nature of electromagnetism. The usual long, thin wire isn't the best way. Antenna arrays, another approach, consist of thousands of small antennas which are either placed randomly or regularly spaced. Fractals provide the perfect mix between randomness and order, and with fewer components. Parts of fractals have the disorder, while the fractal as a whole provides the order. By bending wires into the shape of Koch's Curve, more wire can be fit into less space, and the jagged shape also generates electrical capacitance and inductance. This eliminates the need for external components to tune the antenna or to broaden its range of frequencies. Motorola has started using fractal antennas in many of its cellular phones, and reports that they're 25% more efficient than the traditional piece of wire. They're also cheaper to manufacture, can operate on multiple bands, and can be put into the body of the phone. The journal Fractals showed why fractals work so well as antenna. For a antenna to work equally well at all frequencies, it must be symmetrical around a point and it must be self-similar, both of which fractals can provide.
Good Fractal Antennas
Serpinsky's Triangle
(11 KB)
Koch's Curve
(3 KB)
Serpinsky's carpet
(23 KB)
Check out my fractal zoom movies (avi)
Mandelbrot Zoom (1.1 Mg) Julia Set Zoom (784 Kb)

Clicking on each thumbnail will open the full sized picture in another window. All images were created with Fractint, and they're best viewed with more than 256 colors.
Coastline at Night
103 KB
46 KB
93 KB
31 KB
Koch's Curve

3 KB
Lamba Series
63 KB
50 KB
Mandelbrot Lightning
17 KB
Sub Mandelbrot
39 KB
49 KB
29 KB
61 KB
Serpinsky's Triangle
11 KB
Red Blue
13 KB
Serpinksy's carpet
23 KB
Fractal Mountain
Fractal Moon
Fractal Pictures

Fractal ResourcesI've used FractInt for all the fractals on this page. It's a really good program with lots of pre-programmed fractal types. It's also fast and has bells and whistles like color cycling, good palette editing, and 3d rendering.
Most of the stuff that I've learned about fractals has come from teachers, and it's hard to find good books about them, but The Mathematical Tourist has an interesting section on fractals. You can probably get it at any bookstore. It's very interesting.