L-systems

From GenerativeArt

(Difference between revisions)
Jump to: navigation, search
(New page: == L Systems == <em>Named after Aristid Lindenmayer.</em> A grammer based system for describing and generating branching structures which (often) exhibit self-similarity === Basic Operat...)
(L Systems)
=== Basic Operations ===
=== Basic Operations ===
-
<tt>
+
* n is number of iterations
-
* n is number of iterations
+
* δ is angle increment
-
* δ is angle increment
+
* d is step size (length increment)
-
* d is step size (length increment)
+
* F is move forward with length d with pen down
-
* F is move forward with length d with pen down
+
* f is move forward with length d with pen up
-
* f is move forward with length d with pen up
+
* + is turn left by angle δ
-
* + is turn left by angle δ
+
* - is turn right by angle δ
-
* - is turn right by angle δ
+
* [ pushes current state down the stack (i.e. saves position and heading)
-
* [ pushes current state down the stack (i.e. saves position and heading)
+
* ] pops the current state off the stack (i.e. gets position and heading)
-
* ] pops the current state off the stack (i.e. gets position and heading)
+
-
</tt>
+
-
'''Example of how to interpret a string'''
+
==== Example of how to interpret a string ====
-
<tt>
+
  δ = 45°
  δ = 45°
  d = 2
  d = 2
  F[+F]F[-F]F
  F[+F]F[-F]F
-
</tt>
+
 
 +
{|
 +
|-
 +
|{{SingleImage|imageURL=http://www-viz.tamu.edu/courses/viza658/wiki/lsys/lsys01.png|caption=Example showing string interpretation}}

Revision as of 03:26, 14 September 2009

Personal tools