mcmandelbrot : package documentation

An example of AsynQueue in action. Can be fun to play with if you have a multicore CPU. You will need the following packages, which you can get via pip install: weave (part of SciPy); numpy (part of SciPy); matplotlib; and of course asynqueue.

Command line usage:


 mcmandelbrot

   [-d <description>,] [-N, <iterations>,]

   [-s, <steepness>,] [-o, <imageFile>,]

   Nx, cr, ci, crPM[, ciPM]

Writes PNG image to stdout unless -o is set, then saves it to imageFile. In that case, prints some stats about the multiprocessing computation to stdout.

To see an overview displayed with ImageMagick's display command:


 mcmandelbrot 2000 -0.630 0 1.4 1.2 |display

Write a detailed view to the image detail.png:


 mcmandelbrot -o detail.png 3000 -0.73249 +0.21653 0.0112

Run a local AMP server in the background and then connect to it to generate images (don't leave TCP servers running on Internet-exposed machines unless you know what you're doing):


 twistd -y AsynQueue-0.9.1/mcmandelbrot/wire.py

 export DESC="tcp:localhost:1978"

 mcmandelbrot -d $DESC -o detail-01.png 3000 -0.73249 +0.21653 0.01

 mcmandelbrot -d $DESC -o detail-02.png 3000 -0.73249 +0.21653 0.001

Run a local HTTP server, to which you can connect via port 8080 and generate images interactively with your web browser:


 twistd -noy AsynQueue-0.9.1/mcmandelbrot/html.py

As of this package release date, I have one of these running on a quad-core VPS at http://mcm.edsuom.com.

See Also main, html, wire to start. Interesting supporting modules are image and runner. The ground-level computation is done in valuer.
Module colormap Colormapping, which is a tricky business when visualizing fractals that you can zoom in on.
Module gui A simple PyQt4 GUI for mcMandelbrot.
Module html A Twisted web Resource that serves clickable, zoomable Mandelbrot Set images.
Module image Render Mandelbrot Set images in PNG format in response to Twisted web requests. Used by html.
Module main No summary
Module runner Runner for Mandelbrot set computation processes.
Package test Unit tests for mcmandelbrot
Module valuer Point valuer for mcmandelbrot. Each CPU core has its own copy of MandelbrotValuer that is called via the AsynQueue.ProcessQueue.
Module vroot The VRoot combines with the Baton to provide a powerful way to generate an HTML page. Adapted from another project for use in the mcmandelbrot demo site.
Module wire Uses asynqueue.wire to run and communicate with a server that generates Mandelbrot Set images.
API Documentation for AsynQueue, generated by pydoctor at 2016-11-16 14:52:14.