Dimensions - Demo 1


The structure observed in the 2d map demonstrations - the "chaotic attractor" - seems to be neither space filling (an area) or a simple curve (a line). This complex geometry can be characterized by a non-integral dimension, and the structure is then called a fractal.

The simplest definition of the dimension is the box counting dimension or capacity. The space is covered with boxes of side l and the number N(l) containing points of the attractor is counted. This is repeated for smaller and smaller l and the dimension is given by logN/log(1/l) as l gets very small.

This scheme is illustrated for the Henon attractor in the following applet. The box size is reduced by a factor of 2 at each step, down to some smallest size. The boxes containing points are drawn on the attractor, and the number of boxes containing points is displayed. Finally the curve of logN against log(1/l) is plotted (log base 2 is used).

Iterate the map for some large number of points (e.g. 10000), and then hit "Dimension". After some time (depending on the speed of the computer) the dimension algorithm will be complete, and the results at successive levels of box size are displayed by repeatedly hitting "Continue". It should be apparent that as the box size is reduced, finer levels of the "curve" of the Henon attractor are resolved, so that the number of boxes grows faster than linearly with the inverse box size, but not as fast as quadratically (which would give boxes covering the whole plot). Finally hit "Plot It" and the curve of logN against log(1/l) is plotted in a separate window. Clicking successively on two points of this plot will give a least squares linear fit to the points between (and including) the clicked points, and the expression for the dimension estimated from the slope of the fitted line will be displayed.

You should find the points lie quite well on a line (except for the first one or two points where the box size is comparable to the size of the whole attractor) showing that N(l) is indeed proportional to l-D giving an estimate for the dimension D. You can try fitting a line to various segments of the curve to see how good the straight line actually is. Increase Points to 1000 (remember to hit Enter after changing the value!), and accumulate 100,000 points to see how this changes the results.) You might want to turn of the display of the boxes, since replotting causes a substantial delay with this many points.)

Some pitfalls of dimension estimates are shown by the following applet. Iterate for a much smaller number of times e.g. 200, and repeat the process. The minimum box size is decreased as well (12 division levels).


For good estimates of the dimension lots of low noise data are needed. As the dimension of the attractor increases the amount of data needed increases enormously. The dangers of extracting a false "dimension" from too small a range of box sizes, squeezed by the practical limitations at large and small box sizes, should be borne in mind.

Other things to try

  1. Enlarge a region of the plot before applying the dimension algorithm. Does the dimension depend on which region of the attractor is investigated?
  2. Accumulate a very large number of points and fit over a wide range of box size. Estimate the dimensions from each range of box size (e.g. successive points on the dimension plot) and study how the estimate of the dimension varies with the scale of the box used.

Return to text
[Next Demonstration] [Introduction]
Last modified Tuesday, December 7, 1999
Michael Cross