generativepy — maths diagrams and animations in Python

Martin McBride
Graphic maths
Published in
7 min readDec 2, 2023

--

generativepy is a free and open-source library for creating diagrams, images, and animations in Python.

It is mainly intended for geometric diagrams including generative art, mathematical illustrations, fractals, and similar. It can also be used for creating general diagrams and is particularly suited to automatically created data-dependent diagrams.

This software is used to create almost all of the images and videos on my GraphicMaths channel.

The library can also create animations, from simple GIFs to complex, multi-scene HD videos.

In addition to vector graphics, the library can also create and process bitmap images. Work is ongoing to add a 3D graphics capability.

Since the different image types are all converted to a common NumPy format, it is possible to automatically sequence and compose images of different types.

In this article, we will review the main features of the library.

Open source

generativepy is a free and open source, released under the MIT licence. The source is available on github at github.com/martinmcbride/generativepy.

You can use the library in any way you wish and can adapt it to your needs. However, if you add bug fixes, improvements, or new features please consider submitting a pull request so that your changes can potentially be added for other people to use.

--

--