Equation for generating Julia`s fractal:

where c — complex parameter. Julia`s set for this system is a subset of the complex plane, defined as:

So, let`s now try to create one of the fractals in the image above.

For this we need the Python module Pillow, which makes it easier to work with images and so on.

To install a pillow via pip, enter the following command at the command line.

pip install Pillow

Now use this library to create a fractal image.

Output:

Also refer to this video at phone number for more information.

After understanding the code, try drawing other fractals by changing the value of the variables and post your link to github in the code in the comments section and I`ll be happy to help you if any error occurs.

This article is courtesy of ** Subhajit Saha ** . If you are as Python.Engineering and would like to contribute, you can also write an article using contribute.python.engineering or by posting an article contribute @ python.engineering. See my article appearing on the Python.Engineering homepage and help other geeks.

Please post comments if you find anything wrong or if you`d like to share more information on the topic discussed above.

X
# Submit new EBook

` ` |