L-systems II
From GenerativeArt
(Difference between revisions)
</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=}} |