Platonic Music Engine logo

Mondrian

Painting for this style algorithm.

Composition with Red, Blue and Yellow. Original by Piet Mondrian.

This Style Algorithm creates art works inspired by Piet Mondrian’s work using primary colors, line, and squares/rectangles. Each of his paintings in this style differs in interesting ways. I did not attempt to represent all of his techniques but maybe a kind of rough amalgamation.

We start by drawing a random number of vertical and horizontal lines at discrete intervals. Then rectangles are generated at random such that their sides lie on the lines previously drawn. Any rectangle that overlaps an existing rectangle is rejected. The rectangles are then colored at random to complete the process.

Copyright 2015 David Bellows

Colophon