The Computational Beauty of Nature
Source code

bifur1d

plot bifurcations from a one-dimensional map

Full screen →

bifur1d -help
  or
bifur1d
       [-width  integer] [-height integer] [-skip integer]
       [-rmin double] [-rmax double] [-func string] [-fac-
       tor  double]  [-ymin  double]  [-ymax double] [-aux
       double] [-box integer] [-brmin double] [-brmax dou-
       ble]  [-bymin  double] [-bymax double] [-inv] [-mag
       integer] [-term string]

Plots a bifurcation diagram for a one-dimensional map to illustrate how a change in a single parameter can move a system from fixed-point behavior, to periodic, and finally to chaos. Different regions can be zoomed in on.

A bifurcation diagram is plotted for a one-dimensional map according to the specified options. In general, the map is iterated for several different values of the 'r' parameter so that the long term behavior of the map can be observed as a function of are supported. User defined maps can be added to the file maps1d.c, but you must recompile the program.

Maps

The following four one-dimensional maps are allowed:

Logistic Map: x(t+1) = 4 r x(t) * (1.0 - x(t))

Tent Map: x(t+1) = (x(t) <= 0.5) ? 2 r x(t) : 2r * (1.0 x(t))

Sine Map: x(t+1) = sin(x(t) PI aux 2 r) / 2 + 0.5

Gaussian Map: x(t+1) = r exp(-aux (x(t) - 0.5) * (x(t) - 0.5))

See the file "maps1d.c" to see how to add user-defined maps.

Bugs

No sanity checks are performed to make sure that any of the options make sense.

Options

-widthWidth of the plot in pixels.640
-heightHeight of the plot in pixels.480
-skipNumber of initial points to skip.500
-rminSmallest value for r.0.0
-rmaxLargest value for r.1.0
-funcMap function to use (one of 'log', 'tent', 'sin', or 'gauss').log
-factorMultiplicative factor for number of iterates.2.0
-yminSmallest value for y range.0.0
-ymaxLargest value for y range.1.0
-auxAuxiliary map parameter.1.0
-boxLine width for a box.0
-brminSmallest r-value for the box.0.0
-brmaxLargest r-value for the box.0.0
-byminSmallest value for box y range.0.0
-bymaxLargest value for box y range.0.0
-invInvert all colors?False
-magMagnification factor.1
-termHow to plot points.None

bifur1d.c on GitHub