Need help with fractal?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

danilobellini
138 Stars 33 Forks MIT License 33 Commits 2 Opened issues

Description

Fractals written in Python

Services available

!
?

Need anything else?

Contributors list

# 134,468
HTML
meetups
Shell
reprodu...
32 commits

.. README.rst created with generate_readme.py, don't edit this file manually. License is MIT, see COPYING.txt for more details.

Fractals in Python

.. image:: https://travis-ci.org/danilobellini/fractal.svg?branch=master :target: https://travis-ci.org/danilobellini/fractal

Repository with Python code that renders fractals, compatible with both Python 2.7 and 3.2+, showing and saving files with Matplotlib.

For more information about the maths used for fractals (as well as its history), see the Wikipedia pages about the

Julia set
_ and
Mandelbrot set
_.

..

Julia set
: https://en.wikipedia.org/wiki/Juliaset ..
Mandelbrot set
: https://en.wikipedia.org/wiki/Mandelbrot
set

Examples

. Julia fractal

::

 python -m fractal julia -0.644 --size=300x200 --depth=25 --zoom=0.6 --show

.. image:: images/julia-0.644size=300x200depth=25zoom=0.6.png

. Julia fractal

::

 python -m fractal julia -0.7 +0.27015 j --size=500x300 --depth=512 --zoom=0.6 --show

.. image:: images/julia-0.7+0.27015jsize=500x300depth=512zoom=0.6.png

. Julia fractal

::

 python -m fractal julia -0.7102 +0.2698 j --size=500x300 --depth=512 --zoom=0.65 --show

.. image:: images/julia-0.7102+0.2698jsize=500x300depth=512zoom=0.65.png

. Julia fractal

::

 python -m fractal julia -0.77777 -0.25 j --size=527x331 --depth=200 --zoom=0.7 --show

.. image:: images/julia-0.77777-0.25jsize=527x331depth=200zoom=0.7.png

. Julia fractal

::

 python -m fractal julia -0.8 +0.156 j --size=400x230 --depth=50 --zoom=0.65 --show

.. image:: images/julia-0.8+0.156jsize=400x230depth=50zoom=0.65.png

. Julia fractal

::

 python -m fractal julia -0.8 +0.156 j --size=500x300 --depth=512 --zoom=0.6 --show

.. image:: images/julia-0.8+0.156jsize=500x300depth=512zoom=0.6.png

. Julia fractal

::

 python -m fractal julia -1.037 +0.17 j --size=600x300 --depth=40 --zoom=0.55 --show

.. image:: images/julia-1.037+0.17jsize=600x300depth=40zoom=0.55.png

. Mandelbrot fractal

::

 python -m fractal mandelbrot --size=300x300 --depth=80 --zoom=1.2 --center=-1x0 --show

.. image:: images/mandelbrotsize=300x300depth=80zoom=1.2center=-1x0.png

. Mandelbrot fractal

::

 python -m fractal mandelbrot --size=400x300 --depth=80 --zoom=2 --center=-1x0 --show

.. image:: images/mandelbrotsize=400x300depth=80zoom=2center=-1x0.png

. Mandelbrot fractal

::

 python -m fractal mandelbrot --size=500x500 --depth=256 --zoom=6.5 --center=-1.2x0.35 --show

.. image:: images/mandelbrotsize=500x500depth=256zoom=6.5center=-1.2x0.35.png

. Mandelbrot fractal

::

 python -m fractal mandelbrot --size=500x500 --depth=80 --zoom=0.8 --center=-0.75x0 --show

.. image:: images/mandelbrotsize=500x500depth=80zoom=0.8center=-0.75x0.png

. Mandelbrot fractal

::

 python -m fractal mandelbrot --size=600x600 --depth=256 --zoom=90 --center=-1.255x0.38 --show

.. image:: images/mandelbrotsize=600x600depth=256zoom=90center=-1.255x0.38.png

Parameters

Examples above can also be done with a

--output fractal.png
parameter, which saves the example to a image file, while
--show
just shows the raster fractal image on the screen (both parameters can be used together). For more help, see::

python -m fractal --help

Which shows all options available. To see all colormaps names available in Matplotlib, see the

colormaps on the scipy wiki
_ or type in a Python shell:

.. code-block:: python

[m for m in import("pylab").cm.datad if not m.endswith("_r")]

..

colormaps on the scipy wiki
: http://wiki.scipy.org/Cookbook/Matplotlib/Showcolormaps


License is MIT, see

COPYING.txt
_ for more details. By Danilo J. S. Bellini

.. _

COPYING.txt
: COPYING.txt

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.