L system: monopodial tree

It should have been the post before Sympodial tree.

In short, I gave up on 2 sequential loops, the first building the long sentence and the 2nd loop for converting the sentence into movements of the turtle (axis system).

modeling is simple but too many loops, impacting performance and also I could not find a way to include parameters for the movements. for example, different angles for the same input (A or B etc).

So I merged the 2 loops into 1 loop. modeling became more complex but not impossible to understand and still following the logic of rewriting method of a l-system.

now, my model cannot be called l-system formally, but as I follow the l-system grammar for the algorithm, I keep calling L-system.

Monopodial tree is just an extension of the binary tree with simple branching. like for the Sympodial tree, there is "\\\$" function, a rolling of the turtle so that its Left axis (Local Y) become horizontal!.

refer to the book: "the algorithmic beauty of the plants" page 56.

trying to put it in words

A ->

  • move A forward of l, then pitch 45 deg and output B, with l shorter of a ratio of r2), this is the branch
  • Then back to A after 1st move and roll of 137.5 deg, then output B with shorter of a ratio r1). this is the trunk.

B -> 

  • move B forward of l, then yaw of 45 deg on the left and roll to get local Y horizontal and output C, with l shorter of a ratio of r2), this is the branch
  • Then back to B after 1st move and output C with shorter of a ratio r1. this is left branch.

C -> 

  • move C forward of l, then yaw of 45 deg on the right and roll to get local Y horizontal and output B, with l shorter of a ratio of r2), this is the branch
  • Then back to C after 1st move and output B with shorter of a ratio r1. this is left branch.

Frankly, I have troubles to visualize the algorithm... because of B becomes C and C becomes B.... trial and errors in the modeling.

you can play with the tab experiments

​​​​​​​

xGenerative Design