+ ~~~~~~~~~~~~~~~~ GUSB.US ~~~~~~~~~~~~~~~~ + | ~ the personal website of gus brocchini ~ | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + MACHINDRIAN Machindrian is a python program that generates paintings in the style of Piet Mondrian. You can see the code here, if you'd like. I wrote this program partially because I wanted to learn a little bit about DrawBot, a python package for generating 2d graphics, but mostly because I wanted to interrogate what makes Mondrian's paintings so beautiful. In some ways, it's a response to the "I could do that!" reaction that I've had in the past to modern art. how it worksAn animation showing the steps that Machindrian takes to generate the painting. The hardest part of making these paintings is dividing up the canvas. I realized that when trying to mimic Mondrian on paper, I would draw a line and then "grow" other lines off of it. Taking that approach, Machindrian grows lines out from each end, occasionally branching off. To avoid lines being too close to each other, and to simplify some of the details, I round everything so the lines end up on a grid. (The image above uses a 50 by 70 grid.) After I decide it's complex enough (by simplistically checking if there are more than 12 lines in total), I turn off the branching, so each line grows until it hits an edge or another line. Then, the colors are assigned randomly, with a 40% chance of being white and a 20% chance each for red, yellow, and blue. lessons and limitations The thing that Machindrian is absolutely worst at is picking colors. There's often only one color, and the paintings are almost always haphazardly arranged. This was the biggest revelation for me——how obvious it is that some of the paintings are better than others. At more or less the same time I was writing this program, I was reading Robert M. Pirsig's "Zen and the Art of Motorcycle Maintenance," and I couldn't help but think of this project as a demonstration of his concept of Quality. Even if you've only seen a few Mondrians in a long-forgotten history class, and even though the Machindrian paintings meet many of the requirements of the De Stijl style, it's immediately obvious that they aren't true Mondrians. You can look at sample paintings below, and I hope that they'll reveal something about the beauty of Mondrian's work. get another painting
Gus Brocchini Burlingame, CA January 2021