Now comes part two of my Processing documentation for Momentary: an algorithmic animation of a cherry tree, drawn in a pen line style.
After working on the mountains, it came time to work on other components of the scroll. I started playing around with different tree sketches that others had written in Processing. The one I finally chose to work with was a drawing by Luca Ongaro. In his animation, every time the viewer clicked their mouse, a new tree would be drawn with branches and blossoms. It was a rather static piece that only varied in the frame between clicks.
Since the animation for momentary was about dynamically drawn content, it was up to me to deconstruct the code and reformat it so that each line was drawn methodically and over time. Since I was interested in simulating line strokes, I rewrote the code so that all the intersection locations were saved in an array and then the points that composed the branches were drawn, point by point, in continuous strokes, with the cherry blossoms being after thoughts that bloomed on the branches as soon as the were given life by the artist.
I have several versions of these stroke drawings, each surveying slightly different purposes. The trees used in the final piece did not have the cherry blossoms. I included this version since I put in the effort to allow for a growing item in the piece which was never fully realized in the final piece. There is no point in leaving it to simply languish on my hard drive without ever being realized in the vast world.
Thus, I post a sample and the code for you to use as you will. Attribution and a link back would not be unappreciated.