"fractal geometry will make you see everything differently.  there is danger in reading further.  you risk the loss of your childhood vision of clouds, forests, galaxies, leaves, feathers, flowers, rocks, mountains, torrents of water, carpets, bricks, and much else besides.  never again will your interpretation of these things be quite the same."
-micheal barnsley

FORWARD

this is a fractals project i did for my choas class senior year of college.  located here are programs and source code that will render a fractal image onscreen, and some captures from them.  they were written for the win32 platform and require opengl.  i wrote this page in a casual tone to extend my audience to friends and family.  scroll down for the entire project, or just visit the gallery.

INTRODUCTION

well, what is a fractal?  mandelbrot defined one as a rough or fragmented geometric shape that can be subdivided in parts, each of which is (at least approximately) a reduced-size copy of the whole.  the word fractal itself is rooted in the latin adjective fractus meaning 'irregular' which corresponds to the verb frangere meaning 'to break.'  the fractal nature of our world can be seen in the boundaries of clouds, snowflakes, ferns, mountains and more.  all of these possess statistical self-similarity where as the fractals i will be showing you possess exact self-similarity.  in the case of the fern, each leaf is an exact copy of the whole.

FRACTAL GEOMETRY

most of us are familiar with euclidean geometry.  you've got your cartesian plane for two-dimensions.  most man made objects belong in euclidean geometry, consisting of lines, arcs, boxes, cones, spheres and so on.  each of these objects has a dimension: a line is one-dimensional, a triangle 2, a barrel 3.  the mathematical formula that describes the relationship between dimension (D), linear scaling (L), and the resulting increase in size (S) is: S = L ^ D  this is pretty easy to see.  if we increase the length of a square by 3, it's area is increase by 9, or 3 ^ 2.  a square is a two-dimensional object.  the dimensions encountered in euclidean geometry are all integers, this is no so for fractals.  if we manipulate the equation we get: D = log(S) / log(L)  if this equation yeilds a non-integer dimension, welcome to fractals.  however, there is no one way to calculate dimension.  mathematicians have come up with about 10 different methods with names like self-similarity dimension, capacity dimension, Hausdorff dimension, and topological dimension.

ITERATION

iteration is nothing more than repeating an action over and over.  perhaps an easy way to illustrate with a picture.  on the first row we have the initiator, and on the second the generator.  to generate the first iteration we take the initiator and replace it with the generator.  to generate the second iteration we take the result from the first iteration and replace all occurances of the initiator, scaled down, with the generator scaled down appropriately.  my appologies for the crude image, but you get the point.

ITERATED FUNCTION SYSTEMS

all the fractals you will find on this page were generated with iterated function systems.  this is one of the most common ways to create fractal images, though not all fractals can be created in this way.  these systems are described by repeatedly computing the terms in two series, one for the x coordinate the other the y coordinate.  the general form is:
x[n+1] = a * x[n] + b * y[n] + e y[n+1] = c * x[n] + d * y[n] + f
we start with an initial arbitrary point (x[0], y[0]) and compute to (x[k],y[k]), where k is the number of iterations, and plot each point.  if we could calculate out to infinity, the image we end up with is not dependent upon the initial point, almost every point will end up giving us the same picture.  this picture, or set of points, is known as the fixed point of the IFS, or an attractor of the dynamical system.  one great side effect of this approach is data compression.  just by defining two equations and a few variables i've got the definition of an entire picture.

iterated function systems, with the right parameters, give rise to many biological looking constructs.  the barnsley fern is perhaps the most famous.  check out my biological pictures page.  and this page contains pictures resembling snowflakes or crystals.

IMPLEMENTATION

the code for my program can be found here.  in general, i used the equations above.  for each picture there is an array for each coefficient (a,b,c,d,e,f).  each index of the array will then specify the transform functions.  i choose one at random, with specific probabilities for each.  see table.


KOCH CURVE

koch curve at 1000000 iterations.  this curve was presented by koch to the mathematical community as an example of a curve that is not differentiable, ie. it has a tangent at nowhere.  this is an example of a strictly self-similar fractal.  but what interests me most is its length.  if we zoom in on a section of the curve, we see that it is the same as the whole.  in fact, between any two points on the curve, there exists an entire koch curve.  the distance between any points on the curve is infinite, yet the curve itself lies in the unit square.  this curve crams infinite length into finite space without ever intersecting itself!




BARNSLEY'S FERN

perhaps one of the more attractive ifs fractals.
click here to view many pictures of the fern at different iterations



SIERPINSKI CARPET

this is generated by taking a square, subdividing it into 9 squares, removing the middle, repeat on the 8 subsquares.  i threw in a little last minute code to give it tie-dye effect.  click on the image for the gallery.

SIERPINSKI GASKET VARIATIONS

this is a variation of the sierpinksi triangle, an ifs with three similarity transformations

and this would be the pentagon.  it has 5 similarity transformations.  do you see the koch curves in the attractor?  click to zoom.



THE CANTOR MAZE

the cantor maze is an ifs with three transformations, one of which is a similarity.

THE LEVY DRAGON

TABLE OF FUNCTION PARAMETERS COMING SOON
a 0.3333333333 0.0 0.0
b 0.0 0.3333333333 -0.3333333333
c 0.0 1.0 1.0
d 0.3333333333 0.0 0.0
e 0.3333333333 0.6666666667 0.3333333333
f 0.6666666667 0.0 0.0