Iterated Function System

An iterated function system (IFS) is a self similar fractal. It is defined as a set of transformations, and the output is the set of points that are invariant under these transforms. That is, each transform takes the resulting complete shape and maps it to a (usually smaller) subset of that shape.

Any shape that can be generated by an IFS can also be generated by an L-System, though the inverse is not true (Not every L-System is also an IFS).

Code Example

The most common method for rendering an IFS is the chaos game.

  • Start with any point.
  • Repeat:
    • Choose a transform at random.
    • Apply the transform to the current point to get the next point

This gives a sequence of points. By discarding the first N points, the final shape is not dependent on the initial point chosen (Assuming the starting point is sufficiently near, where sufficient is determined by the size of N). Continue to generate points until no more CPU is left, or no changes happen.

Since the shape is filled in each region it takes longer to see detail the further in the system is zoomed so an IFS is not typically a good choice if arbitrary extreme closeups of the shape are needed.

PCG Wiki References

External Links

Iterated Function System - Wikipedia article.

Flickr Stream

The following images on Flickr have been generated using IFS:

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License