henwarp
warps a square into the phase space of the Henon system
henwarp -help
or
henwarp
[-width integer] [-height integer] [-swap] [-len
integer] [-count integer] [-A double] [-B double]
[-ulx double] [-uly double] [-lly double] [-inv]
[-mag integer] [-term string]
Takes a square of a specified area and “warps” it a fixed number of times by the Hénon system. This illustrates the stretching and folding motion of chaotic systems as well as shows how points within an attractor's basin of attraction are eventually forced into a strange attractor.
A square (initially centered about the origin) is transformed by the Henon system, which is described by the equation x(t+1) = A - x(t)^2 + B * x(t - 1), a fixed number of times according to the specified parameters.
Miscellany
You may wish to try this with a small length for the size of square and watch how the resulting plot changes as you slowly increase the value passed to the -count option starting at zero. The square will slowly spread out and converge to the attractor of the system.
The method for choosing the viewable region may seem counter-intuitive at first, but it has some nice properties. In particular, selecting the exact (x, y) coordinates for the upper-left corner and only selecting the lower right y coordinate forces both the x and y scales to be identical since all scales are uniquely determined by these values along with the plot width and height. If you then change the width or height of the plot, the relative scales will still match up. The options for making a box work similarly.
Bugs
The length of the square is in pixels and works best if it is an odd value. With even numbered values it can produce a gap in the plot for small values supplied with the -count option.
No sanity checks are performed to make sure that any of the options make sense.
Options
-width | Width of the plot in pixels. | 480 |
-height | Height of the plot in pixels. | 480 |
-swap | Swap the x and y axis. | True |
-len | Length of edge of square. | 301 |
-count | Number of transformations. | 1 |
-A | Value of the A parameter. | 1.29 |
-B | Value of the B parameter. | 0.3 |
-ulx | Upper-left corner x-coordinate. | -1.75 |
-uly | Upper-left corner y-coordinate. | 1.75 |
-lly | Lower-left corner y-coordinate. | -1.75 |
-inv | Invert all colors? | False |
-mag | Magnification factor. | 1 |
-term | How to plot points. | None |