A repo to generate algorithmic art using python, focusing on fractals.
Just run any of the Python files to generate the corresponding GIF. For example:
python3 SierpinskiCarpet.py
or
python3 SierpinskiTriangle.py
or
python3 circles.py
The construction of the Sierpinski carpet begins with a square. The square is cut into 9 congruent subsquares in a 3-by-3 grid, and the central subsquare is removed. The same procedure is then applied recursively to the remaining 8 subsquares, ad infinitum.
The Sierpiński triangle (sometimes spelled Sierpinski), also called the Sierpiński gasket or Sierpiński sieve, is a fractal attractive fixed set with the overall shape of an equilateral triangle, subdivided recursively into smaller equilateral triangles.
A grid of circles that change colours based on a rainbow pattern. First time using ImageIO.
A tile made of convex and concave octagons, with each animated to switch to the other. All inspiiration and credit: http://tabletopwhale.com/colorpalette.html
Individual tiles can be stacked to form a wall of tiles:
-
PIL - Python Imaging Library (abbreviated as PIL) (in newer versions known as Pillow) is a free and open-source additional library for the Python programming language that adds support for opening, manipulating, and saving many different image file formats.
-
ImageIO - Imageio is a Python library that provides an easy interface to read and write a wide range of image data, including animated images, volumetric data, and scientific formats. It is cross-platform, runs on Python 3.5+, and is easy to install.
Thanks to the #100DaysOfCode Twitter community for encouraging me to code for fun!!
Sierpinski Triangle: https://www.youtube.com/watch?v=IRY1HoU2Qo0