JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net

The open source
grid computing

 Home   About   Features   Download   Documentation   On Github   Forums 

Generation of Mandelbrot Fractals

What does the sample do?

This sample generates Mandelbrot fractals images by submitting the computation to a JPPF grid.

How do I run it?

Before running this sample application, you must have a JPPF server and at least one node running.
For information on how to set up a node and server, please refer to the JPPF documentation.
Once you have a server and node, you can either run the "run.bat" script (on Windows), "./" script (on Linux/Unix) or, from a command prompt, type: "ant run".

How do I use it?

The GUI provides many options and a lot of interactivity.

Generating Mandelbrot images

The "Compute" button submits the image generation for processing by JPPF.

The image generation is governed by a set of 4 parameters:

  • center X: the X coordinate of the center of the image
  • center Y: the Y coordinate of the center of the image
  • diameter: this determines the range of possible values of both X and Y axis
  • iterations: the maximum number of iterations of the algorithm, before considering that a point "escapes" the Mandelbrot set
Tip: modifying the cordinates of the center is equivalent to a "pan" functionality
Tip: modifying the diameter provides, in effect, a zooming capability

You can interact with the image using the mouse:

  • a left click will zoom-in by the value of the zoom factor, and move the center to the selected point
  • a right click will zoom-out by the value of the zoom factor, and move the center to the selected point

In the toolbar, the zoom-in and zoom-out buttons provide a static zoom functionality (they do not move the center).
Tip: setting the zoom factor to 1 and clicking left or right in the image is equivalent to panning with the mouse.

Additionally, the dimensions of the image can be set in the config/ configuration file:

# width of the generated images in pixels
image.width = 800
# height of the generated images in pixels
image.height = 600

Recording and replaying parameters sets

The sample allows recording multiple sets of parameters (x, y, diameter and iterations) so they can be replayed later, and eventually saved and loaded as CSV files. The saved files can also be reused by the Mandelbrot movie generator sample.

The possible actions are:

  • record toggle recording: this switches from recording mode "off" to "on" and vice versa. When recording is on, any newly generated image will have its parameters added to the record set
  • replay replay: replays the current set of records as a slide show, with 2 seconds between images
  • clear clear: this removes all records from the current set, which therefore becomes empty
  • open open: open a previously saved CSV file containng a set of records
  • save save: save the current record set to a CSV file

How can I build the sample?

To compile the source code, from a command prompt, type: "ant compile"
To generate the Javadoc, from a command prompt, type: "ant javadoc"

I have additional questions and comments, where can I go?

If you need more insight into the code of this demo, you can consult the source, or have a look at the API documentation.

In addition, There are 2 privileged places you can go to:

JPPF Copyright © 2005-2020 Get JPPF at Fast, secure and Free Open Source software downloads