Monday, March 8, 2010


I wrote a program to draw bifurcation diagrams of any 1-dimensional map.

Recently, I studied 1-dimensional maps in my nonlinear dynamics course. I recommend reading about this topic: it is fascinating that an expression as simple as p_next = r*p*(1-p) can lead to what is known as "chaos." r is a constant, p is a number between 0 and 1, and the expression is repeatedly evaluated. The resulting sequence of p can either settle to a fixed number, periodically cycle between values, or continue aperiodically and seemingly in a random fashion. A bifurcation diagram concisely depicts the behavior as the parameter r changes. Read more about the logistic map on Wikipedia or elsewhere.

I used Matlab for most numerical work pertaining to the course. In my spare time, though, I wrote this program to experiment with different maps and parameters. Also, because the program runs so much more quickly, I could create better images without waiting. (This program builds upon my earlier project that dynamically compiles code, and so it runs efficiently.)

Download (Unzip and run CsBifurcation.exe).
Source (GPLv3 license)

To use the program, type in an expression, and click Go. By default, the famous logistic map is shown. Use the mouse to zoom in. By holding the Alt key and dragging, you can zoom in on a non-square rectangle of the plot. Refer to the readme.txt file for more information. I encourage you to run this program and explore the intricate details of the logistic map, and to invent your own 1D maps. The program can also create animations by slowly changing one of the parameters over time. I will post some of the animations I've made at a later date.

As I wrote new expressions and drew bifurcation diagrams, I began to search for interesting shapes and details. I began to compose images based on appearance rather than mathematical properties. A selection of this work: