A simple wallpaper generator in python, to have fun with graphics and python.
Inspired by this kind of wallpaper.
You need python3 and the requirements that are in requirements.txt
(basically Pillow
). Unfortunately, the commands I use to create the files might only work on UNIX systems, and the command to update your desktop wallpaper works with Gnome / Unity (tested under Ubuntu 14.04).
Feel free to tweak the program to work on your system, you can even open a pull request if you want to integrate your tweaks.
Install python3, the requirements in requirements.txt
, and then you're good to go. Executing main.py
will create a wallpaper in renders/
and update your Gnome/Unity wallpaper. With install_cron.sh
, you can even install a cron job that changes your wallpaper every 30 minutes.
Here's what it gives with colors picked from a palette, on my Ubuntu desktop. If you ask yourself, I use the wonderful Flatabulous theme for icons and windows.
The algorithm is quite simple:
- First a lattice of rectangles is created, here shown with random colors for rectangles
- Then, a random mutation (translation) is applied to the vertices of the lattice
- Then, a gradient of colors can be applied to the polygons
- Different angles can be used for the gradient
Here's the effect, when colors are picked from a palette of 5 colors at random, angle is chosen at random and mutations are random: