L system: the Hilbert curve

Another famous fractal curve with rewriting method. let me know if you have question on how to make it.

the 3dxml is inside.

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

 


Alphabet : A, B

Constants : F + −

Axiom : A

Production rules:

A → +BF−AFA−FB+

B → −AF+BFB+FA−

Here, "F" means "draw forward", "+" means "turn left 90°", "-" means "turn right 90°" (see turtle graphics), and "A" and "B" are ignored during drawing.

in my model: A=1 B=2 F=3 +=4 -=5

the first step is missing. is it not symmetrical!!! I will update soon (hopefully).

the next one will be a variant of the Hilbert curve: Moore Curve following Lindenmayer System

​​​​​​​