25 Years of Programming
An open source source for C, C++, OWL, BASIC, MDB, XLS, DOT, and more...
Home   Projects   Up   Sitemap   Search   Blog   Forum+Chat   About Us   Privacy   Terms of Use   Feedback   FAQ   Images   Services   Payments   Humor   Music

Brief overview of Iterated Function System (IFS) fractal design

Several programs on this site explore the concepts of chaos and fractals as described in James Gleick's book, Chaos: Making a New Science, and other books that go into greater depth on fractal shapes in particular.

Michael Barnsley invented a way to create fractal shapes using rules called "iterated function systems", "iterated function sets", or IFS. The method is to take a starting point on the plane, apply some rules to derive what the next point will be, and then apply the rules over and over again to plot consecutive points. The result is a fractal shape in which every part of the shape is a smaller copy of the shape.

While the IFS is a system of equations, the equations always take the same form. Therefore, to specify a particular IFS, all that is needed is to specify the variables to plug into the equations. These are also called IFS or IFS sets. A particular IFS set will always produce the same image. A computer program that properly applies the IFS will produce that image.

A single transformation might look like this, given that x and y are the coordinates of the previously plotted point:

newx = Ax + By + E
newy = Cx + Dy + F

A,B,C,D,E,F are constants.

A full IFS will probably consist of more than one transformation. The second will look just like the one above, but with different constants. Before a new point is plotted, a random number is generated, and that is used to determine which of the two (or more) transforms will be used to plot the next point. It is not necessary that the two transforms have an equal probability of being chosen.

Here is the structure an .IFS file:

3 - first line is number of transformations
A B C D E F P - IFS constants for transform #1
A B C D E F P - transform #2
A B C D E F P - transform #3

A,B,C,D are all multiplied by 100 for simplicity. The interpreting program divides them by 100 before use. P is the probability of that transform being chosen. Thus, an actual IFS file might look like:

3
50  0 0  50 10 10 .25
45  5 5  45 20 -5 .25
15 15 9 -25 10 -5 .50


This topic is discussed at greater length in WShowfs.RTF, the WinHelp file for the Windows C++ version of my fractal design program.

 

 

Valid HTML 4.01 Transitional Valid CSS
Yahoo! Search
Search the web Search this site
View content labeling at ICRA.