#Creative Coding #TurtleArt

Coding Mondrian Style Random Art

This project is coded with TurtleArt in order to randomly generate Mondrian art-style projects, inspired by a Dutch painter Piet Mondrian.

Checkout Outputs from My Program

This project will randomly generate a Mondrian art style inscreen artwork whenever it’s run. Here are 6 selected outputs of my program. 

Code Showcase

Explanation & Statement

Project Reflection

How my code works

In this project, the TurtleArt program initiates by placing the turtle at a unique, randomly generated position on the canvas. From this starting point, the turtle proceeds to draw a series of rectangles. The dimensions of each rectangle, including its length and width, are also determined randomly. The artistic process unfolds through 30 iterations, wherein different types of rectangles are drawn. These rectangles include those filled with blue, red, or yellow colors, as well as rectangles with black outlines. This randomized approach results in a dynamic composition that evokes the spirit of a Mondrian painting, with each run producing a distinct and visually engaging artwork.

How I approached this project

Before I start, I analyze the pattern of Mondrian's work by identifying the four crucial elements: blue, red yellow filled rectagles and rectangles with black outlines. I came to realize they all share the same pattern. Thus, I experimented with the Random block by using it in various parts of the code. Initially, I used it to set the initial position of the turtle, providing a random canvas location as the starting point. Then, I extended its use to determine the dimensions of each rectangle, both in terms of length and width. This experimentation allowed for a wide range of possible shapes and sizes, adding complexity and variety to the artwork. In the end, the whole process is simplified into five blocks: the basic block -- random box, and then the red, blue, yellow and black boxes. Throughout the creative process, I tried to make the whole art piece not as random as the current code by making it looks like grids with black lines and then randomly filled the blocks with red, blue and yellow. However due to the limitation of the TurtleArt programming, the filling part is hard to fulfilled, which I will work on it later in the future to see if there're other approaches. What didn't work as well were instances where the randomness was too extreme, resulting in chaotic or extra-large shapes. Finding the right balance between randomness and aesthetic appeal proved to be a challenge. It was fascinating to observe how subtle changes in the random values could lead to vastly different visual outcomes, keeping the artistic process exciting and unpredictable.

Scroll to Top