Changed the line syntax to (line x1 y1 x2 y2)
This commit is contained in:
@@ -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)
|
||||
@@ -13,7 +13,7 @@
|
||||
))
|
||||
;
|
||||
(defn when-animate () (
|
||||
(stroke (line prev-pos mouse-pos) 4 "#72dec2")
|
||||
(stroke (line (of prev-pos :x) (of prev-pos :y) (of mouse-pos :x) (of mouse-pos :y)) 4 "#72dec2")
|
||||
(move w h)
|
||||
(rotate 0.002)
|
||||
(scale 0.998)
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
(cx cy r a)
|
||||
(
|
||||
(stroke
|
||||
(line
|
||||
(pos cx cy)
|
||||
(circle-pos cx cy r a)) 2 "white")))
|
||||
(line cx cy (of (circle-pos cx cy r a) :x) (of (circle-pos cx cy r a) :y)
|
||||
) 2 "white")))
|
||||
;
|
||||
(defn draw-star
|
||||
(cx cy r c)
|
||||
|
||||
Reference in New Issue
Block a user