====== Structural rules ====== ===== L-System style ===== Of the two structural rules this one is much more commonly used in GroIMP. It replaces each instance of the pattern defined on the left side with the new created graph structure on the right side. ==> ; So if all A's in the model should be replaced by F's the patterns a the A's and the new structure is an F: A ==> F; ==== pattern side ==== The definition of the pattern that should be replaced can be defined by using [[:groimp-platform:graph_queries| xl syntax]] and [[:groimp-platform:xl-operators|xl-operators]]. A[F] ==> F; first((*A*)) ==> F; Additionally the pattern can be defined using conditions: A(1)==>F; a:A,(a.len!=1)==>F; ==== structure side ==== A more complex structure can be created by using the [[:3d-guide:3d-manipulations#turtle_commands|turtle geometry]] and [[:3d-guide:3d-manipulations#graph-syntax|graph-syntax]]. A ==> F [RL(90) F A] F +> A; With the addition of modules and 3d objects more object oriented nodes can be added: A ==> F [RL(90) Cylinder(1,4) A] F +> MyNewNode(2.4); ===== SPO style ===== SPO: Single pushout graph rewriting ====== Execution rule ======