Skip to main content

A program for generating Mandelbrot fractal images

Project description

This is a program which generates the Mandelbrot fractal set of a given width and height for a given number of iterations.

It uses Pillow, the Python Imaging Library fork to render the image and save it to a file.

Sample Usage.

To see all command line arguments, pass -h to the program.

$ mandelbrot -h usage: mandelbrot [-h] [-W WIDTH] [-H HEIGHT] [-n NITER] [-o OUTPUT]

Mandelbrot fractal generator

optional arguments:
-h, --help

show this help message and exit

-W WIDTH, --width WIDTH

Width of the image

-H HEIGHT, --height HEIGHT

Height of the image

-n NITER, --niter NITER

Number of iterations

-o OUTPUT, --output OUTPUT

Name of output image file

By default, the program generates a mandelbrot fractal image of size 640x480 pixels to a file named mandelbrot.png for 1000 iterations to a file named mandelbrot.png .

$ mandelbrot Creating mandelbrot set with size 640x480, #iterations=1000

Here is an example of creating an image of size 1280x720 pixels with 5000 iterations and saving it to mandelbrot_big.png

$ mandelbrot -W 1280 -H 720 -n 5000 -o mandelbrot_big.png

The package also includes the ‘mandelbrot_mp’ program which uses PyMP to improve performance by parallel execution on multiple cores in the machine if available. The command line arguments remain the same.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mandelbrot-0.1.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file mandelbrot-0.1.tar.gz.

File metadata

  • Download URL: mandelbrot-0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mandelbrot-0.1.tar.gz
Algorithm Hash digest
SHA256 82e7c625401aed02b7d073de06da935b81213927807421a2b7b00997655a9e1a
MD5 ef0ff17135eba3a2db9204c14313a9c6
BLAKE2b-256 326e240da66b0c99623d7e055a6713962f5912f0c358a5eb8d1e87daaeb213fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page