
There were so many variables to play around with in the last script, and it wrapped my brain in knots enough perfecting it, that I decided I’d try and get two blog posts out of it instead of just one. In the words of every loathsome boss, you are getting “more bang for your buck”… but since you aren’t paying for any of this, I won’t be held responsible for your own personal level of “bang”. If the image above just caught your eye and you want to try reproducing it right away, you will have to go back to the previous Example 10.4 and wallow your way through that to try and understand the script. If you already did that, congratulations! this one will be a piece of cake since we are only changing the initial conditions. Piet Mondrian Before I get into the script, I wanted to say something very quickly about the modern artist Piet Mondrian. One of the most ubiquitous artists of the 20th century, his work is a textbook study for art classes on the processes of abstraction.

Evolution of Mondrian Paintings between 1908 – 1921. From Top Left – 1. The Red Tree (1908-1910) 2. The Grey Tree (1911) 3. Flowering Apple Tree (1912) 4. Composition in Blue-Grey-Pink (1913) 5. Composition with Gray, White and Brown (1918), 6. Composition with Large Red Plane, Yellow, Black, Gray and Blue, 1921.
Source: Wikiart.org, except 3. abcgallery.com & 4. paintingdb.com
I’ve shown this series to students a few times. Usually I show them the last image first (or one like it) and ask who painted it. There are always quite a few students who know the answer. I then show them the first image, and ask who painted it. So far no one has known. It is of course, also Mondrian. If you tell someone the last image is an abstraction of a tree, they will never believe you, unless you show the the sequence of Mondrian paintings over a decade. The individual steps are clear. But the overall jump is not. Why do I mention this. Because this grasshopper script also kind of proves Mondrian was not off base. Using a “branching process”, we will be able to generate abstract patterns that are very close in pattern to what Mondrian had become famous for.
Initial Setup

To get started, you should take the script version from the last Example 10.4 and simply replace the initial setup BEFORE the loop with a new version as described in the image above. The two major differences are as follows:
This version divides the edge curve just like in the previous version, but it does not make use of the attractor points to direct the initial geometry. Instead, all initial angles are 90° from the edge curve. This vector can be obtained by using the “Tangent” at each division point, and then rotating this 90° with Vector Rotate.
The second major difference is that the length of the starting lines is determined by a random domain of numbers. We can have great variety in the length of the initial lines, or they can be rather uniform in length. For this first example (myMondrianGenerator TM) – the Branching Angle will be 180°. I also played around a little bit with the “Branching probability” and “Minimum Branching Length” parameters.
Output

This time we didn’t need to do TOO much new work. If everything is hooked up right, just push play and soon your initial lines will branch and divide to look like the image on the right. Looks pretty mondrianesque! (maybe his 4th painting) Of course, he wasn’t a slave to grasshopper, and could do what he wanted…he also has many other, less famous paintings, where his work is more figurative, but he is most famous for these ‘procedural’ paintings.
Variations

Using this script, I played around quite a bit with the branching angles (60°, 90°, 170°, 180°), the number of initial lines, as well as the branching probability. The tests with high branching probability are more “uniform” since all lines tend to branch more or less around the same time. When the branching probability is very low, some lines will go for a VERY long time without branching. The variations towards the right show this.
To make it more clear, in all the images above, I did a bit of post production where the line thickness increases as the length of the segment increases. In the variations with high branching probability, most lines are close to each other in weight, and there are few very thick lines. Lines that had a short life will still appear thin. In the variations with low probability, the lines that grew and grew without passing the branching test end up quite long and thick, and are clearly visible.
One More Thing – Using Script on a “Real” Project

Without getting too specific on how this could be used on a “real” project, I just wanted to show the completely arbitrary example above. Note that the edge curve on this script, or on Example 10.5, can be ANY closed shape imaginable. Also, you can also feed a few of your own “Dead Curves” into the loop before it even starts. If I was imagining doing a plaza design at a building entrance, as well as the lobby, the two “Dead Curves” might represent some special geometry, such as a fountain, tree well, etc, which the script will work around. In both the examples above, I ran the script twice, once for the outside plaza, and once for the inside lobby… Each time I adjusted the parameters slightly when going from inside to outside.

Comments
5 responses
Goodluck in constructing it, there is no fixed paving module
Hello there! Could you please answer me that what is next after loop start component? I’ve checked other examples which are related to this one but sadly, I couldn’t understand. I would be so glad if I could fix these parameters. Btw thank you for sharing,this blog is amazing…
Well there is quite a bit after the loop start which is explained in Example 10.4 after the section ‘Starting the Loop’. Sorry I can’t be of more help than that.
Hello, I have been a fan of your work and this blog for many years. Many thanks for sharing such valuable content for grasshopper learners. I
I was trying to recreate this script (in conjunction with what you shared for example 10.4). I have checked every component and reviewed its functions/connections, but the script fails to generate loops. I am rather at a loss. Would it be possible to post the grasshopper definition for this so I can compare where I have missed? Such would be incredibly helpful and appreciated.
Best, Angela
Hello, I left a comment yesterday, and got a notification that there was a reply, but somehow I do not see either of them…
I have recreated and have been playing around with this script tutorial and would be happy to develop it further for a paving pattern project we are iterating. I have been encountering issues with getting the script working, and I suspect I put in the wrong inputs with some of the hidden wire connections. Would it be possible to post the grasshopper definition? I would be very grateful for the input and would be happy to share our application.
Best regards, Angela