September 1, 2019

Playing with Mondrian and generative art

A few days ago I had the opportunity to visit the Thyssen-Bornemisza Museum in Madrid. When I was in front of this Mondrian painting, I had the idea that it would be fun to make a generative art project where the coloured lines of the painting would extend outwards from the canvas and would grow and fork along the wall. 

And so this project was born. The specific painting is "New York City, 3", an unfinished work by Mondrian. I made the project with Scratch using a photograph of the painting. Below you have an animated gif that shows the effect.

The programming requires clones and recursivity, so conceptually it can be a bit more complicated than the previous projects I've published in this blog, but if you're familiar with Scratch you'll be able to understand the code perfectly, and in fact the scripts are quite short. Here you can try the project and check the scripts. Please feel free to remix it!

To achieve the effect I created 10 sprites (two for each of the colors of the lines: red, blue, yellow, black and white). The characters are simple colored dots of the same thickness as the lines in the picture, and to draw we simply move and stamp them on the stage. The 10 original sprites start from the painting, from specific positions to create the effect that the lines of the painting grow. Each character will move to the edge of the stage. Along the way, randomly, each one creates clones of itself, and these clones have exactly the same behavior (draw in a straight line to the edge), but before they start they turn 90º to the left or to the right. Clones also create clones, so in the end there are hundreds of characters moving on the screen.

I have also made the central painting, after a few seconds of running, start to spin on itself. And I also added music (Boogie Woggie, from "Jazz Art / Art Jazz" concert, live improvisation to modern art. John Chmaj, pianist) to make the animation more beautiful.


Other possible projects could be to replicate this idea with other Mondrian paintings, or turn the animation into a game, add interactivity, think something similar but with other artists, imagine other ways of using an existing artwork as a seed for a generative art project...


Post a Comment