few months ago, I tried fractal curves with Xgen when the loop function was released. but the way I did to make the L systems, was not quite academic . this time, I wanted to follow the method of "rewriting", as much as I understood it. usage of "Select" function following Bertrand Faure video was really helpful (thank you Bertrand - https://www.youtube.com/watch?v=kmZnq7jJ1qI)
as a trial: the arrowhead of Sierpinski.
https://en.wikipedia.org/wiki/Sierpi%C5%84ski_curve
Sierpiński curve - Wikipedia
en.wikipedia.org
Alphabet: A, B
Constants: F (move forward), + (turn right), − (turn left)
Axiom: A
Production rules:
A → B-A-B ; B -> A+B+A
A and B trigger F
Angle: 60
in my model, A=1 B=2 +=3 -=4
the algorithm is in 3 parts
- substitution of the axiom by production rules -> generate a list (2,4,1,4,2) etc
- creation of the base points (the turtle's positions) step by step using the list to select the right action (translate, rotate, translate
- creation of the final shape (flat...)
when modeling, I found function "select" very handy. I did not know it could handle boolean input of the index as well
with this way, I can study a wide range of L systems without changing the logic of my model... I hope I can come back to trees again...
let me know if you have better ARGO!
