mandelbrot

Synopsis

(mandelbrot xmin xmax ymin ymax maxiter width)

Parameters

  • xmin: The left coordinate on the real axis (inexact)
  • xmax: The right coordinate on the real axis (inexact)
  • ymin: The upper coordinate on the imaginary axis (inexact)
  • ymax: The lower coordinate on the imaginary axis (inexact)
  • maxiter: Maximum number of iterations
  • width: Width of the resulting graymap (height is computed)

Description

This procedure executes the classic mandelbrot escape algorithm and returns a view of the mandelbrot set as a 16 bit graymap at the specified location and with the specified parameters. The way how a pixel belonging to the interior is colored can be specified using the set-mandelbrot-interior-mode! procedure.

Since the graylevels are represented in 16 bits one can hardly see anything directly in many cases, so either graymap-normalize! or graymap-equalize! may be applied afterwards in order to achieve a visually pleasing result.

Return Value

The resulting 16 bit graymap is returned.

See Also

Example

> (define x (mandelbrot -2.0 2.0 -2.0 2.0 200 640))
x
> (graymap-equalize! x)
ok
> (graymap-writepng x "mandelbrot-test.png")
ok
> (define y (graymap-readpng "mandelbrot-test.png"))
y
> y
#<graymap(16) orow:-1 ocol:-1 xres:-1 yres:-1 w:640 h:640>
> (graymap-equal? x y)
#t
>

The 16 bit grayscale PNG image file mandelbrot-test.png displays as follows:

fractal-example-16bit.png

Artwork Examples

The following digital artwork has been generated with the mandelbrot procedure with some postprocessing using Affinity Photo afterwards.

The resulting picture has the dimensions 27976x20982px with 586.99MP in TIFF RGB with 16 bits per channel.

The location coordinates are: xmin 0.270922313433143324272, xmax 0.270922360217271027727, ymin 0.004722307821717227065, ymax 0.004722342880202797249.

source-e-gold-800x600.jpg

The area of this view in the complex plane is -2.0 to 1.0 on the real axis and -1.5 and 1.5 on the imaginary axis:

mandelbrot-set-on-fire.jpg