The Computational Beauty of Nature
Source code

gen1d

generate time series from a one-dimensional map

gen1d -help
  or
gen1d  [-points integer] [-skip integer] [-r double] [-aux
       double] [-x0 double] [-func string]

Generates a time series from a one-dimensional map. Nothing fancy; it just shows how chaos can be seen in simple systems.

A time series data set is generated by a one-dimensional map according to the specified options. See the MAPS section of the manual page for details of what maps 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.

Miscellany

Use a plotting program (such as gnuplot) or a spreadsheet to plot the data.

Bugs

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

Options

-pointsNumber of points to plot.10
-skipNumber of initial points to skip.0
-rValue for the r parameter.1.0
-auxAuxiliary map parameter.1.0
-x0Initial value for x.0.123456
-funcMap function to use (one of 'log', 'tent', 'sin', or 'gauss').log

gen1d.c on GitHub