summaryrefslogtreecommitdiff
path: root/examples/l-system-example.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/l-system-example.lisp')
-rw-r--r--examples/l-system-example.lisp14
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/l-system-example.lisp b/examples/l-system-example.lisp
index 4d8a53a..37d5cc3 100644
--- a/examples/l-system-example.lisp
+++ b/examples/l-system-example.lisp
@@ -1,5 +1,15 @@
(in-package #:l-system-examples)
+;;Lindenmayer's original L-system
+;;Example 1: Algae
+(-> a ()
+ (a) (b))
+
+(-> b ()
+ (a))
+
+(l-system #'parametric-grammar '((a)) 3)
+
;;;Parametric grammars
(-> f ()
(f 1)
@@ -9,10 +19,10 @@
(-> j (x)
(j (* 3 x)))
-(l-system #'parametric-grammar '((f 1.0)) 2)
+(l-system #'parametric-grammar '((f 1.0)) 3)
;;;Context sensitive grammars
(-> (f j f) (x)
(j (* 2 x)))
-(l-system #'context-sensitive-grammar '((f 1.0)) 2)
+(l-system #'context-sensitive-grammar '((f 1.0)) 3)