New example: Christmas tree
authorJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 May 2009 12:19:15 +0000 (14:19 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 May 2009 12:19:15 +0000 (14:19 +0200)
examples/christmasTree.txt [new file with mode: 0644]

diff --git a/examples/christmasTree.txt b/examples/christmasTree.txt
new file mode 100644 (file)
index 0000000..c52f7a8
--- /dev/null
@@ -0,0 +1,34 @@
+RULE "Start"
+WHEN Length <= 0
+GROW BY 1
+SET TAG = "Root1"
+
+RULE "Story 1"
+WHEN TAG = "Root1"
+// No Percentage means 100%
+BRANCH ANGLE = 70°, LENGTH = 2, Tag = ""
+       ANGLE = -70°, LENGTH = 2, Tag = ""
+       ANGLE = 0°, LENGTH = 1, TAG = "Root2"
+SET TAG = ""
+
+RULE "Story 2"
+WHEN TAG = "Root2"
+BRANCH AT 100% ANGLE = 70°, LENGTH = 1.5, Tag = ""
+               ANGLE = -70°, LENGTH = 1.5, Tag = ""
+               ANGLE = 0°, LENGTH = 1, TAG = "Root3"
+SET TAG = ""
+
+RULE "Story 3"
+WHEN TAG = "Root3"
+BRANCH AT 100% ANGLE = 70°, LENGTH = 1, Tag = ""
+               ANGLE = -70°, LENGTH = 1, Tag = ""
+               ANGLE = 0°, LENGTH = 1, TAG = "Root4"
+SET TAG = ""
+
+RULE "Story 4"
+WHEN TAG = "Root4"
+BRANCH AT 100% ANGLE = 70°, LENGTH = 0.5, Tag = ""
+               ANGLE = -70°, LENGTH = 0.5, Tag = ""
+               ANGLE = 0°, LENGTH = 1, Tag = ""
+SET TAG = ""
+