L-systems
From GenerativeArt
(Difference between revisions)
(→L Systems) |
|||
F[+F]F[-F]F | F[+F]F[-F]F | ||
- | {{SingleImage|imageURL=http://www-viz.tamu.edu/courses/viza658/wiki/lsys/ | + | {{SingleImage|imageURL=http://www-viz.tamu.edu/courses/viza658/wiki/lsys/01.png|caption=Example showing string interpretation}} |
+ | |||
+ | == L Systems Growth == | ||
+ | L Systems can grow via iterative string substitution. | ||
- | |||
Initial condition - n d and δ | Initial condition - n d and δ | ||
Production Rules: specifies string substitution | Production Rules: specifies string substitution | ||
- | === Example === | + | ==== Example ==== |
Initial Conditions | Initial Conditions | ||
n = 2; F[+F]F[-F]F[+F[+F]F[-F]F]F[+F]F[-F]F[-F[+F]F[-F]F]F[+F]F[-F]F | n = 2; F[+F]F[-F]F[+F[+F]F[-F]F]F[+F]F[-F]F[-F[+F]F[-F]F]F[+F]F[-F]F | ||
- | {{SingleImage|imageURL=http://www-viz.tamu.edu/courses/viza658/wiki/lsys/ | + | {{SingleImage|imageURL=http://www-viz.tamu.edu/courses/viza658/wiki/lsys/02.png|caption=Example showing string substitution}} |
+ | |||
+ | === Symbols === | ||
+ | L Systems can also have symbols which have no drawing operations associated with them, but which add to complexity in production | ||
+ | |||
+ | ==== Example showing usage of symbols ==== | ||
+ | |||
+ | w: X | ||
+ | p1: X → F[+X]F[-X]+X | ||
+ | p2: F → FF | ||
+ | |||
+ | n = 0; X | ||
+ | n = 1; F[+X]F[-X]+X | ||
+ | n = 2; FF[+F[+X]F[-X]+X]FF[-F[+X]F[-X]+X]+F[+X]F[-X]+X | ||
+ | |||
+ | {{SingleImage|imageURL=http://www-viz.tamu.edu/courses/viza658/wiki/lsys/03.png|caption=Example showing string substitution with symbols}} |