A python library for exploring the Mandelbrot Set
Mandelpy is an easy to use library that gives you the opportunity to navigate the Mandelbrot Set, it needs just few parameters to work giving you gorgeous resoults.
Mandelpy has just two dependencies, numpy and Pillow, to install them via pip:
pip install numpy pip install Pillow
The easiest way to install Mandelpy is with pip, just type in the command
pip install mandelpy
alternativly the whole source code can be found at the following GitHub link
Mandelpy implements just one class, the MandelbotSet one, this class defines a pecise position, a zoom value, the size of the picture and the unit pixel of the picture.
To create the easiest picture of the Mandelbrot Set, just call the image() function:
form mandelpy import MandelbrotSet as MS m = MS() m.image()
this will create an image of the Mandelbrot Set, anywhen you want to create the image call the image() function.
If you want to change the position of the view use the function coordinates()
to change the size:
and the zoom:
notice that the zoom value is the negative natural logarithm of the radius of the photo, to set the radius instead use
m.radius = r_value
changeing the image name is also very easy:
to change the iteration number for the Mandelbrot Set calculator (normaly set on 100)
m.definition = # of iteration
is even possible to change the pattern unit of the Mandelbrot
notice that will be in grey scale.
In some cases the image may take a while to render, to help out is available a printed workflow, just add the True parameter in the image() function
- Matteo Magri - MatteoMagri
This project is licensed under the MIT License - see the LICENSE.md file for details