Steven Strogatz, a mathematician at Cornell University and the author of a really cool book on chaotic dynamical systems was asked to guest blog at the New York Times today. He has written a short but interesting piece about power laws originating in biological systems and even in cities.
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).
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.