Botany
I’m Daniel. I do research in theoretical physics and I’m not good at drawing, but I have always had a penchant for the visual and I love code.
I’ve been to museums and marveled at the intricate, arduous patterns more talented artists have created. I was impressed, but I’ve always believed a computer would be able to draw many similar things, if we could just teach it.
This got me thinking about the exact process of drawing a pattern. I codified what is called in physics a ‘random walk’. An image of a path that starts at a certain point and takes arbitrary steps and turns, like the movement of an atom. Only my path has a memory: it knows where it has been before and how to avoid that. Then it is more like the growth of a plant. This is a way for me to generate an infinite amount of art, with much more precision than I could by hand. I started coding different genes into the algorithm: increasing or decreasing e.g. the chance to split, turn, grow fruit or leaves, the desire to grow up or stay away from the boundary. Also the colors, size, possible angles. All in all there are more than 30 parameters that determine the ‘species’ of a tree. I have taken to calling these parameters ‘genes’, for self explanatory reasons. The algorithm chooses the genotypes at random, using smart distributions, and then grows the offspring autonomously. I was amazed how organic the result looked, and the sheer amount of variation in the plants that came out. I recognize proud oaks, prickly cacti, messy shrubs, wavy seaweed and a million others, all diverse, like in the real world. Even though no emotion was coded in, the evoked responses range from endearment to threat to awe. Mostly, in my eyes, sheer beauty.
I was also confronted with failure. Though any gene in itself can be useful, some combinations proved catastrophic. If the rate of splitting is too large, and the growth isn’t slowed enough by the presence of previous branches, one gets a cancerous mess. I had to control for this possibility and teach the algorithm to abort in this case. This project proved a much more metaphor for life than I had intended.
In an album below I present only the very best specimens. The winners of the lottery. You can try for yourself on the main page and see that they don’t all turn out so great.
Note that in my own code, I can use the topological data of the tree to interpolate smoothly between segments, with what is called a ‘Bezier curve’, and there are other ways in which I can tune the style. That’s not all possible on the webpage. I have made the online interface as simple as I could, also using some smart theory to color the trees in the most attractive way I could, to the human eye.
Finally: The Seed:
The trees are made by a random process. First, the long number you see corresponds in a kind of encoding (sort of like each digit is a genotype) to the genes themselves. After that, essentially the computer throws a hand of dice and lets the outcome of the roll decide the next step in the drawing process. A 1: turn left, a 2: split, a 3, turn right, etc. To get the ball rolling, one needs to give it the first ‘random number’ called a seed. (That’s the actual term in computer science). Once this number is set, all the following numbers follow. If I give it the number 11 twice, I get the same tree twice. Luckily there can be 9007199254740992 such seeds, so there’s no practical limit to the variation. One can also define new seeds after the genes have been set, that allows us to number the offspring. In a way, I think it’s kind of poetic: Plant a seed, get a tree.
The Arborithm Arboretum