Computer Graphics
Fractal Images
Animated Example #1 | Animated Example #2
 
Fractal Simple fractal: example. State
This is an example of how a simple fractal is generated. The fractal image will change every second; it can be "frozen" by moving the mouse pointer over it (moving the mouse out will resume the cycle). Clicking on the fractal will show all steps together.
These fractal images were constructed using a VRML viewer on SUN machines, as an assignment for the Computer Graphics course given by Professor D. Thalmann, EPFL/LIG, in summer '98. The VRML code for each individual image, which contains the position, size and color for every single cube, was generated by a small C program.
What's a Fractal? A fractal is obtained by replacing certain elements of a fixed primary image according to a defined pattern with copies of that primary image, duely scaled, and repeating that operation over each copy until the desired depth is reached.
In order to generate a fractal, you need to define the following:
1. The primary image that would serve as basic element for your fractal. In this example, this structure is simply a cube.
2. Once you have chosen the basic element, you need to define the way in which your structure is going to be "split" when you increase the depth of your construction. In our case, the next step is generated by replacing each basic element (i.e. each cube) with an assembly of four identical cubes half its size placed in the same corner (that is, the position of the corner is the same for every element and for every depth; in our case, it is the bottom left-hand near corner of the basic cube).
3. You can now repeat the "splitting" as many times as you wish. Each additional step you take to increase the depth of the fractal will improve the image and make it smoother and prettier.
Example: Why and How? In this example, the maximum depth plotted was 8, that is, the basic element was "split" 8 times according to the splitting rule as defined under (2) in the previous section. The reason why I stopped at 8 was because it took too long for the VRML viewer to render deeper fractals (close to 30 minutes for depth 8).
At any rate, increasing the depth at this level wouldn't have changed the picture drastically, it would only sharpen the shapes.
For the record, the VRML code for the depth-8 fractal is more than 12 megabytes in size!
 
Return to Contents
 
EPFL Fractal images created by Sergei Poskriakov
Swiss Federal Institute of Technology 
Computer Graphics Laboratory
LIG

Webmaster:  Serguei.Poskriakov@epfl.ch.