r.mandelbrot - A Perl-script to compute the
mandelbrot set within a XY-location.
(GRASS 6 Raster Program)
r.mandelbrot map=result [-2rp] [iterations=255] [cols=3000] [rows=3000]
The r.mandelbrot script computes the
If no parameters are provided, r.mandelbrot calculates the generic Mandelbrot set using a minimum number of iterations (15) for a default region displaying the whole mandelbrot-set.
The iterations-parameter defines the number of iterations for the current mandelbrot (sub-)set.
The cols- and rows-parameters define the resolution to be used.
Without the raster_name-parameter the script defaults to write its results to the raster map "mandelbrot".
The script can be used in several runs to interactively zoom into the mandelbrot set. Once an image has been calculated, use d.zoom to zoom in on interesting features. The regions' setting will be kept for the next run of r.mandelbrot. Alternatively, the -r flag can be used to return to the original settings. Previous content will be overwritten.
The script can only be executed in a xy-location.
A GRASS monitor is crucial to judge the computations progress since this is an excercise in visual mathematics and requires the use of d.zoom.
Navigating within the Mandelbrot-set tends to be an iterative
process by itself. The following procedure is recommended:
(1) Initialize a session by using r.mandelbrot without any parameters. The Mandelbrot set will be displayed in sufficent resolution in the monitor.
(2) Use d.zoom to choose an area of interest.
(3) Now re-run r.mandelbrot, but provide the iteration parameter and possibly also a specific name for the raster file.
Repeat steps (2) and (3) as necessary.
It is always possible to revisit previous mandelbrot-regions,
as the raster_name-parameter stores both the raster
map and its region.
So to re-use the raster_name setting of "foo" one should change to its region by "g.region region=foo", followed by "d.rast foo".
The NVIZ tool is quite handy to visualize the resulting
maps of the Mandelbrot-set.
The described script is an excercise in things GRASS was not
originally ment for. So do not expect it to match the speed of
Publications by Benoit Mandelbrot, Peitgen et al., etc. etc.
Last changed: $Date: 2007/07/16 05:45:34 $