Growing and Branching Lines with Regular Starting Conditions – Example 10.5
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.
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 Basically, you should take the script version from the last Example 10.4 and simply replace it with the version described above. 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 thing is 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 (my Mondrian Generator 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.