Written by Ronald Joe Record (rr@sco) 03 Sep 1991 INTRO ----- The idea here is to calculate the Lyapunov exponent for a periodically forced logistic map (later i added several other nonlinear maps of the unit interval). In order to turn the 1-dimensional parameter space of the logistic map into a 2-dimensional parameter space, select two parameter values (a and b) then alternate the iterations of the logistic map using first a then b as the parameter. This program accepts an argument to specify a forcing function, so instead of just alternating a and b, you can use a as the parameter for say 6 iterations, then b for 6 iterations and so on. An interesting forcing function to look at is abbabaab (the Morse-Thue sequence, an aperiodic self-similar, self-generating sequence). Anyway, you step through all the values of a and b in the ranges you want, calculating the Lyapunov exponent for each pair of values. The exponent is calculated by iterating out a ways (specified by the variable "settle") then on subsequent iterations calculating an average of the logarithm of the absolute value of the derivative at that point. Points in parameter space with a negative Lyapunov exponent are colored one way (using the value of the exponent to index into a color map) while points with a non-negative exponent are colored differently. ACKNOWLEDGEMENTS ---------------- The algorithm was taken from the September 1991 Scientific American article by A. K. Dewdney who gives credit to Mario Markus of the Max Planck Institute for its creation. Additional information and ideas were gleaned from the discussion on alt.fractals involving Stephen Hall, Ed Kubaitis, Dave Platt and Baback Moghaddam. Assistance with colormaps and spinning color wheels and X was gleaned from Hiram Clawson. Rubber band code was adapted from Stacey Campbell's xmandel source. BUILD ----- To build the lyap binary, either use the Imakefile or one of the sample makefiles - Makefile.ODT or Makefile.OSF. Makefile.ODT is a sample makefile used to build lyap on an SCO ODT system. Makefile.OSF was used as a makefile on a DECstation 3100 running OSF/1. If your system has only 16 colors, uncomment the COLORDEFINE line of the Imakefile and/or add a -DSIXTEEN_COLORS to the appropriate makefile. The manual page can be formatted by typing "nroff -man lyap.man > lyap.doc". INSTALL ------- To install lyap, copy the lyap binary to the desired location (the sample makefiles put it in /usr/games/X11) Copy the formatted man page to wherever you keep your local doc (i use /usr/games/X11/doc for games and imaging software), then add that location to your MANPATH. Some "interesting" runs of lyap are included as simple shell scripts in the "params" subdirectory. Ideas, comments, additions, deletions, suggestions, bug reports, code review,... e-mail Ronald Record at firstname.lastname@example.org or ...uunet!sco!rr.