Make Mondria(a)n-style artwork with Python and R/ggplot2
This is done with the Python scripts make_mondrians.py
and mondrian.py
. The former calls the latter but enables iterated generation of rasters.
With make_mondrians.py
, enter the number of paintings and tiles you want and if you want a random starting point (headstart=1) or start from coordinates (0, 0)
(headstart=0 is default). For example:
python3 make_mondrians.py 9 5 5 1
... gives 9 paintings, each as a 5x5 grid, and a random starting point.
This is done with the R script make_mondrians.R
which makes use of ggplot2
for plotting. Some examples of how to read and plot rasters are found inside the script.
You can create and plot individual canvases...
... or use patchwork
to stitch several of them together!