L-systems II
From GenerativeArt
(Difference between revisions)
Current revision (22:38, 16 September 2013) (view source) (→Types of L-systems used in Generative Art: small edit) |
|||
* Bracketed OL-systems: these systems are deterministic and context free. The use of bracket notation allows the use of a stack that can remember and return to previous locations and headings. | * Bracketed OL-systems: these systems are deterministic and context free. The use of bracket notation allows the use of a stack that can remember and return to previous locations and headings. | ||
* Stochastic OL-systems: these systems are also context free but not deterministic. Rather than using a single mapping from predecessor to replacement string, these systems allow multiple replacements strings each with a probability of selection. | * Stochastic OL-systems: these systems are also context free but not deterministic. Rather than using a single mapping from predecessor to replacement string, these systems allow multiple replacements strings each with a probability of selection. | ||
- | * Context Sensitive L-systems: these systems are deterministic but add the use of angle-brackets to either side of the strict-predecessor. To trigger replacement the context prior to | + | * Context Sensitive L-systems: these systems are deterministic but add the use of angle-brackets to either side of the strict-predecessor. To trigger replacement the context prior to and after the strict-predecessor must also match. Such systems can simulate the transmission of signals up and down the resulting tree. |
* Parametric OL-systems: these systems add one or more floating point quantities within parenthesis to one or more letters creating a predecessor word. In addition a test is applied to the corresponding quantity. Such systems allow the creation of non-quantized lengths for stem segments. | * Parametric OL-systems: these systems add one or more floating point quantities within parenthesis to one or more letters creating a predecessor word. In addition a test is applied to the corresponding quantity. Such systems allow the creation of non-quantized lengths for stem segments. | ||
* Parametric 2L-systems: these systems combine parameters and context sensitivity. Such systems can simulate models that involve the diffusion of substances throughout the tree. | * Parametric 2L-systems: these systems combine parameters and context sensitivity. Such systems can simulate models that involve the diffusion of substances throughout the tree. | ||
* Other Stochastic L-systems: as a practical matter a stochastic element can be added to any combination of context sensitive and parametric features. | * Other Stochastic L-systems: as a practical matter a stochastic element can be added to any combination of context sensitive and parametric features. | ||
- | |||
- | |||
== Modeling using L-Systems in 3 Dimensions == | == Modeling using L-Systems in 3 Dimensions == | ||
- | {{SingleImage|imageWidthPlusTen=510|imageURL=http://www | + | {{SingleImage|imageWidthPlusTen=510|imageURL=http://www.viz.tamu.edu/courses/viza658/wiki/lsys2/01.jpg|caption=}} |
p4 : B(x) : x ≥ 1 → B(x - 1) | p4 : B(x) : x ≥ 1 → B(x - 1) | ||
- | {{SingleImage|imageWidthPlusTen=290|imageURL=http://www | + | {{SingleImage|imageWidthPlusTen=290|imageURL=http://www.viz.tamu.edu/courses/viza658/wiki/lsys2/02.jpg|caption=}} |
</table> | </table> | ||
- | How parametric (context sensitive) | + | |
+ | {{SingleImage|imageWidthPlusTen=702|imageURL=http://www.viz.tamu.edu/courses/viza658/wiki/lsys2/03.jpg|caption=}} | ||
+ | |||
+ | |||
+ | {{SingleImage|imageWidthPlusTen=728|imageURL=http://www.viz.tamu.edu/courses/viza658/wiki/lsys2/04.jpg|caption=}} | ||
+ | |||
+ | |||
+ | == How parametric (context sensitive) L-systems work == | ||
+ | |||
+ | Here is a simple example of a parametric 2L-system: | ||
+ | |||
+ | Productions in parametric OL-systems are context-free, ie., applicable | ||
+ | regardless of the context in which the predecessor appears. A context- | ||
+ | sensitive extension is necessary to model information exchange between | ||
+ | neighboring modules. In the parametric case, each component of the | ||
+ | production predecessor (the left context, the strict predecessor and the | ||
+ | right context) is a parametric word with letters from the alphabet V | ||
+ | and formal parameters from the set E. Any formal parameters may | ||
+ | appear in the condition and the production successor. | ||
+ | |||
+ | A sample context-sensitive production is given below: | ||
+ | |||
+ | A(<i>x</i>) < B(<i>y</i>) > C(<i>z</i>) : <i>x</i> + <i>y</i> + <i>z</i> > 10 → E((<i>x</i> + <i>y</i>)/2)F((<i>y</i> + <i>z</i>)/2) | ||
+ | |||
+ | It can be applied to the module <i>B</i>(5) that appears in a parametric word | ||
+ | …<i>A</i>(4)<i>B</i>(5)<i>C</i>(6)… | ||
+ | |||
+ | Because the test succeeds symbol replacement is made as follows (assuming "A(4)" and "C(6)" are not also words requiring replacement): | ||
+ | |||
+ | ((<i>x</i>+<i>y</i>)/2) = ((4+5)/2) = 4.5 | ||
+ | ((<i>y</i>+z)/2) = ((5+6)/2) = 5.5 | ||
+ | …<i>A</i>(4)<i>E</i>(4.5)<i>F</i>(5.5)<i>C</i>(6)… | ||
+ | |||
+ | |||
+ | |||
+ | == Artistic use of L-Systems == | ||
+ | |||
+ | One of the problems with using L-System is that they are difficult to build with a specific end design in mind. This is one reason why evolving L-Systems using genetic algorithms is so useful. It allows the artist to "steer" the result towards a desired goal. | ||
+ | |||
+ | |||
+ | {{SingleImage|imageWidthPlusTen=962|imageURL=http://www.viz.tamu.edu/courses/viza658/wiki/lsys2/05.jpg|caption=}} | ||
+ | |||
+ | |||
+ | {{SingleImage|imageWidthPlusTen=846|imageURL=http://www.viz.tamu.edu/courses/viza658/wiki/lsys2/06.jpg|caption=}} | ||
+ | |||
+ | |||
+ | {{SingleImage|imageWidthPlusTen=919|imageURL=http://www.viz.tamu.edu/courses/viza658/wiki/lsys2/07.jpg|caption=}} |