L system: Ternary branching with tropism

Ternary branching follows the same logic as monopodial and sympodial

pictures are from p60 61 of the book the algorithmic beauty of plants"


in addition to above, let us add a tropism

https://en.wikipedia.org/wiki/Tropism

 

the tropism follows this logic, it is e perturbation to rotate the turtle a little

in term of modeling is Xgen, it becomes as below. long time since I did not use a cross-product....

it was not clear in the book, where to add this code. I decided to put it just after any "yell" or "pitch" -> 3 places in the model.

​​​​​​​

the result is as below with Tropism vector of (0.77,-0.61,-0.19)

​​​​​​​


the result is as below with Tropism vector of (0,0,1)

​​​​​​​​​​​​​​
xGenerative Design ​​​​​​​