Tuto: L system: the binary tree

a big step forward from the previous post is the addition of branching! this is the entry door to tree modeling. I continue on the rewriting method in this post. adding branching has an impact on the performance. it takes quite long.

this is because the rule 2->22. this makes each iteration doubling time... until 9 iteration, I felt Ok but the 10th is too long. 

Anyway, I think it is a good exercise to understand loop function and also how L system is working.

Rules

  • variables : X, F
  • constants: “[”, “]”
  • axiom  : X
  • rules  : (F → FF), (X→ F[+X]-X)

in my model X=1 F=2 +=3 -=4 [=5 ]=6 


4 videos to update the model of Sierpinski curve

1. update of the grammar loop

2. update of the turtle loop

3. accumulator 

4. finishing


in the 2nd and 4 video, you will see I made mistake and try to update. I preferred to keep them so that you understand my way of thinking and how I handle errors. It could be interesting for R&D as well if they have ideas to improve error handling.

START model

1. update of the grammar loop

2. update of the turtle loop

3. accumulator 

4. finishing

FINAL DATA