Monthly Archives: October 2007

Iterated Function Systems and Fractals

This code generates fractals based upon an iterated function system (IFS). Several input files and a Makefile are included. The code is written in C++, and distributed as a tarball. I did this for a class at the University of Utah, but it is based upon a homework assignment for a computer graphics class at MIT (6.837).

Below is the famous Barnsley fern which was generated by an IFS with just four transforms!
Barnsley Fern


New and Improved Sierpinski Triangle C++ Code

I modified my Sierpinski triangle code so that it now allows you to adjust the contraction mapping constant. Normally one uses a contraction mapping constant of 1/2 but if you invert that and instead use an expansion mapping constant of 2, then you get the following pretty picture.
Sierpinski Triangle Under Expansion Map