User:Thierry Dugnolle/Python

From Wikibooks, open books for an open world
Jump to navigation Jump to search

The language of the machine must adapt to the human being, and not the other way around.


The Python files which generate my animations :

High definition paintbrush

Wave packet2

The whole infinite tree

Zoom on an infinite tree

Cantor Set Expansion

Interference of a particle with itself

Wave packet

Double slit experiment


To make an animation, I make use of imagemagick in a terminal. You can install it with the following command:

sudo apt-get install imagemagick

If I open a terminal from the folder where my images are, I can convert them in an animation with the following command:

convert -delay 4 -loop 0 image*.bmp animation.gif

To install Pillow (a package needed for these files to work), you might need the following commands:

pip install --upgrade pip

sudo apt-get install python3-tk

python3 -m pip install --upgrade pip

python3 -m pip install --upgrade Pillow

To edit and run my Python files, I make use of Pycharm. You can download it for free. If you make use of Pycharm, click on the mouse right button on 'PIL' at the top of the file before you run it. Then click on 'Show context actions' with the left button, and on 'Install package Pillow', with the same button.