Piet Mondrian was a dutch abstractionist painter who is most famous for his work is
Theare are pleny of inspired work that could be found on the internet. Here we try to generate similar art using ConTeXt
Normally we are given a page do we will use it's dimensions \paperwidth
and \paperheight
.
We start with a layout setup
\setuppapersize[A4,landscape]
\setupcolors[state=start]
Then we will proceed with the following:
- split our current rectangle in two by randomly chosing a splitting point. Splitting could be randomly chosen horizontal or vertical
- after drawing a line we randomly choose what segments of that line to remove
- this is repeated for N times
- have a grid ready to be filled
We will use MetaPost
for the whole page so it's appropriate
\starttext
\startMPpage
... actual code ...
\startMPpage
\stoptext
Generating image is as simple as running ConTeXt
context mondriano.tex