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), "./run.sh" script (on Linux/Unix) or, from a command prompt, type: "ant run".
The GUI provides many options and a lot of interactivity.
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 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 and
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/jppf-client.properties configuration file:
# width of the generated images in pixels image.width = 800 # height of the generated images in pixels image.height = 600The 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:
- 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: replays the current set of records as a slide show, with 2 seconds between images
- clear: this removes all records from the current set, which therefore becomes empty
- open: open a previously saved CSV file containng a set of records
- save: save the current record set to a CSV file
To generate the Javadoc, from a command prompt, type: "ant javadoc"
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: