Module Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Import alias alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str TupleLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad For NameStore Call NameLoad NameLoad NameLoad body Assign NameStore BinOpAdd BinOpDiv BinOpMult NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad Num NameLoad For NameStore Call NameLoad NameLoad NameLoad body Assign NameStore BinOpAdd BinOpDiv BinOpMult NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad Num NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Num For NameStore Call NameLoad NameLoad body If CompareGt Call NameLoad NameLoad Num body Break Assign NameStore BinOpAdd BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpMult BinOpMod NameLoad Num Num Assign NameStore BinOpMult BinOpMod NameLoad Num Num Assign NameStore BinOpMult BinOpMod NameLoad Num Num Expr Call AttributeLoad NameLoad attr TupleLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad BinOpAdd BinOpAdd BinOpMult NameLoad Num BinOpMult NameLoad Num NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Str orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad Str Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num If CompareLt Call NameLoad NameLoad Num body Print BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num
N/A N/A  A Simple Mandelbrot Fractal Generator.

    We use this example to explore the distributed capabilites of
    the SAGA Job and Filesystem APIs in Bliss. The mandelbrot module
    calculates a full or partial (tile) mandelbrot set fractal and
    writes it to a PNG image file.

    It requires the Python Image Library (PIL) which can be easily
    installed with 'easy_install PIL'.

    The mandelbrot module can be called either as a function::

        from mandelbrot import makemandel
        makemandel( imgX, imgY, xBeg, xEnd, yBeg, yEnd, filename)

    or alternatively on the command line::

        python mandelbrot.py imgX imgY xBeg xEnd yBeg yEnd filename

    The parameters are as follows:

        imgX, imgY: the dimensions of the mandelbrot image, e.g. 1024, 1024
        xBeg, xEnd: the x-axis portion of the (sub-)image to calculate
        yBeg, yEnd: the y-axis portion of the (sub-)image to calculate
        filename: the output filename (defaults to mandel_x_%s_%s_y%s_%s.png)
 N/A __author__ Ole Christian Weidner N/A __copyright__ Copyright 2012, Ole Christian Weidner N/A __license__ MIT N/A sys Image makemandel N/A N/A mandelx mandely xbeg xend ybeg yend filename N/A None N/A N/A xa -2.0 N/A xb 1.0 N/A ya -1.5 N/A yb 1.5 N/A maxIt 128 N/A image N/A N/A Image new RGB N/A N/A xend xbeg N/A yend ybeg N/A y N/A range ybeg yend N/A N/A cy N/A N/A N/A y N/A yb ya N/A mandely 1 ya N/A x N/A range xbeg xend N/A N/A cx N/A N/A N/A x N/A xb xa N/A mandelx 1 xa N/A c N/A complex cx cy N/A z 0 N/A i N/A range maxIt N/A N/A N/A N/A abs z 2.0 N/A N/A N/A z N/A N/A z z c N/A r N/A N/A i 4 16 N/A g N/A N/A i 6 16 N/A b N/A N/A i 16 16 N/A N/A N/A image putpixel N/A N/A x xbeg N/A y ybeg N/A N/A N/A b 65536 N/A g 256 r N/A N/A filename None N/A N/A N/A N/A image save filename GIF N/A N/A N/A N/A image save N/A mandel_x_%s_%s_y%s_%s.gif N/A xbeg xend ybeg yend GIF N/A image N/A N/A N/A __name__ __main__ N/A N/A args N/A N/A sys argv N/A 1 N/A N/A N/A len args 6 N/A N/A N/A Usage: python %s imgX imgY xBeg xEnd yBeg yEnd filename __file__ N/A N/A N/A sys exit -1 N/A imgX N/A int N/A N/A sys argv N/A 1 N/A imgY N/A int N/A N/A sys argv N/A 2 N/A xBeg N/A int N/A N/A sys argv N/A 3 N/A xEnd N/A int N/A N/A sys argv N/A 4 N/A yBeg N/A int N/A N/A sys argv N/A 5 N/A yEnd N/A int N/A N/A sys argv N/A 6 N/A filename None N/A N/A N/A len args 7 N/A N/A filename N/A str N/A N/A sys argv N/A 7 N/A N/A makemandel imgX imgY xBeg xEnd yBeg yEnd filename N/A N/A N/A sys exit 0