Changed the line syntax to (line x1 y1 x2 y2)

This commit is contained in:
Devine Lu Linvega
2019-07-24 20:29:03 +09:00
parent 33574979cd
commit 1c7b74d582
13 changed files with 71 additions and 140 deletions

View File

@@ -1,25 +1,24 @@
(resetTransform)
(clear)
(defn branch
(v)
(if
(gt v 0)
(defn branch
(v)
(if
(gt v 0)
(
(scale 0.95)
(stroke
(line (pos 0 0) (pos 100 100))
10 "white")
(move 100 100)
(pushTransform)
(rotate (div v 50))
(branch (sub v 1))
(popTransform)
(pushTransform)
(rotate (div v -50))
(branch (sub v 1))
(popTransform)
)
)
)
(scale 0.95)
(stroke
(line 0 0 100 100) 2 "white")
(move 100 100)
(pushTransform)
(rotate
(div v 50))
(branch
(sub v 1))
(popTransform)
(pushTransform)
(rotate
(div v -50))
(branch
(sub v 1))
(popTransform)) ))
(branch 10)