Computing: Free Pascal Programming

The Mandelbrot set.

Download mandelbrot console program (Windows 64bit) Download mandelbrot source code (Lazarus/Free Pascal)

Description: Very simple program to draw the Mandelbrot set. Scaling and zooming are set by entering the values using the keyboard and are only elementary. Please have a look at the "mandelbrot readme" file, included in the .zip archive, for details.
The Mandelbrot set is the set of complex numbers c for which the function fc(z) = z^2 + c does not diverge when iterated from z = 0, i.e. for which the sequence fc(0), fc(fc(0)), etc. remains bounded in absolute value. Mandelbrot set images may be created by sampling the complex numbers and testing, for each sample point c whether the sequence goes to infinity (in practice, whether it leaves some predetermined bounded neighborhood of 0 after a predetermined number of iterations). Treating the real and imaginary parts of as image coordinates on the complex plane, pixels may then be colored according to how soon the sequence crosses an arbitrarily chosen threshold, with a special color (usually black) used for the values of c for which the sequence has not crossed the threshold after the predetermined number of iterations. Images of the Mandelbrot set exhibit an elaborate and infinitely complicated boundary that reveals progressively ever-finer recursive detail at increasing magnifications. The "style" of this repeating detail depends on the region of the set being examined. The set's boundary also incorporates smaller versions of the main shape, so the fractal property of self-similarity applies to the entire set, and not just to its parts. The Mandelbrot set has become popular outside mathematics both for its aesthetic appeal and as an example of a complex structure arising from the application of simple rules. It is one of the best-known examples of mathematical visualization. (Text from Wikipedia).

Issue: Vertical scrolling not implemented.

Free Pascal features: Console drawing of mathematical functions using the graph unit.

Click here for images

If you like this program, please, support me and this website by signing my guestbook.