L System: The Hilbert curve 3D

the number of words increased compared to 2D. I could not stay only on numbers. and used a user defined feature to convert the L-system grammar into numbers.

I don't think a tutorial is needed, because the model itself is easier than I thought originally (same as Hilbert 2D but more rotations...)

but let me know if you are interested in or if nay question on the model.

Alphabet : A, B, C, D

Constants : F + - & ^ \\ / |

Axiom : A

Production rules:

  • A = B-F+CFC+F-D&F^D-F+&&CFC+F+B//
  • B = A&F^CFB^F^D^^-F-D^|F^B|FC^F^A//
  • C = |D^|F^B-F+C^F^A&&FA&F^C+F+B^F^D//
  • D = |CFB-F+B|FA&F^A&&FB-F+B|FC//

Converter (user defined function) does below

  • A = 1
  • B = 2
  • C = 3
  • D = 4
  • F = 5 . move forward
  • + = 6 . Yaw +90
  • - = 7.  Yaw -90
  • & = 8 pitch +90
  • ^ = 9 pitch +90
  • \\ = 10 roll -90
  • / = 11 roll -90
  • | = 12 Yaw 180

A, B, C, D are ignored during drawing.