mcmandelbrot.__init__
module documentation
Part of mcmandelbrot
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 . |