Yet another way to parametrically draw a tree.

Making an algorithm to draw a stick tree seems a rite of passage for any computational designer. Thingiverse use it as an example of their in browser customiser; Wassim Jabi’s presents one in his book based on conical possibility space, Dawkins’s discusses genetic models to draw stick trees in The Blind Watchmaker, with a free implementation here and Selçuk revisits Frei Otto’s tied branches parametrically.

That last one is important, as it is less about a free form tree, and more about the performance of a tree-like column, where the tips of the branches are connected by the slab/roof it supports. It’s not a free resonating cantilever anymore, it’s a minimal overall path system carrying forces to the foundation. The sketch below indicates the possible material saving. For the purposes of the sketch I’m not looking at stresses, buckling ect, nor am I looking at cost of making those joints. This is more like finding the minimal road network (or leaf vein network) to connect a set of places to a port.


Actually solving the ‘perfect minimal deviation path’ is a computationally heavy, and a bit of a pain. What follows is my quick and dirty approximation instead.
What we do is:

  1. Set the point that is the bottom of the trunk. We’ll call it BOTT for short.
  2. Choose a value for K, the Konvergence factor. K=1/3 will give you a shape a bit like the sketch above. K = 2 looks more like a fan coral.
  3. Draw a line through all the points where you’d like branch tips. This can be zigzag, spiralled or a nice curve, doesn’t matter, although simpler is easier for you.
  4. Split that line into points, and store them as a list (or equivalent). Each point will be a branch tip.
  5. Go down the list in order, and split the points into groups of 3-5. These are the tips that will converge. If you are designing a real life structure, aim for 2 or 3 at most.
  6. Sum up the X, Y, Z coordinates for the group. Multiply the X, Y, Z values for BOTT by K, and add that to the sum, and take the average for the total in X, Y and Z. That’s the convergence point
  7. Draw a line from each point in the group to the convergence point.
  8. Repeat for all the other branch tip groups.
  9. Assemble all of the convergence points into a list, and repeat. (and repeat and repeat, until you are at the BOTT).
  10. Pipe/extrude cross sections along the lines to get a nice shape. In the image below I just picked a diameter for each ‘level’ based on what looked tree-like, rather than structurally optimised.
  11. Optionally, unify, smooth, add lots of birds and print.

This particular piece was a free standing ornament, so I set the initial line to be a swooping curve that moves up and around the BOTT like the sun does on a warm day.

This particular piece is 3 different failed prints glued together. The pattern of the branches gives a surprisingly dynamic but stable shape. The seed line was a 3d spiral, and the print was paused or cancelled at a fixed height, which gives a physical flat section through the tree. I used it as a shelf support for a while.

Leave a comment

Design a site like this with WordPress.com
Get started