A two dimensional tree algorithm

A trunk algorithm

  • The trunk needs to support and connect an arbitrary number of branches an roots.
  • Draw a vertical (not entirely straight) line shape. The width of the shape is directly depending on the number of branches it needs to support.
  • The bottom part of the trunk is thrice as wide as the top part.

A branch algorithm

  • A branch wants to extend into empty space (maximize entropy).
  • Draw a semi-horizontal line shape pointing up (sometimes straight and sometimes not so straight) with one end attached to either a trunk or another branch.
  • The part of the branch that is attached, is approximately twice the size of the part extending into empty space.

A leaf algorithm

  • A leaf is attached to a branch.
  • Draw a randomly shaped flat object that is about half a quarter of the size of the attached branch with one side turned up and one side turned down.
  • Connect the leaf to the branch with a line shape with a size approximately half a quarter of the size of the leaf.

The root algorithm

  • A root is similar to a branch in wanting to extend into empty space (empty space is where no part of the tree algorithm is already constructed).
  • Draw a more or less squiggly line attached to the bottom of the trunk pointing downwards.
  • The part of the root that is attached, is about three times as wide as the part of the root that is extending into empty space.