Fixed spiral
This commit is contained in:
parent
2a5564465a
commit
fc6a8bf69f
@ -1,30 +1,20 @@
|
|||||||
; animated recusive spiral
|
; animated recusive spiral
|
||||||
; by @local_guru
|
; by @local_guru
|
||||||
(clear)
|
|
||||||
|
;
|
||||||
(defn rec
|
(defn rec
|
||||||
(v)
|
(v)
|
||||||
(if
|
(if (gt v 0)
|
||||||
(gt v 0)
|
((stroke
|
||||||
(
|
(circle
|
||||||
(stroke
|
(add 375 (mul (cos (add (div v 17) (div (time) 2000))) (div v 2)))
|
||||||
(circle
|
(add 300 (mul (sin (div v 11)) (div v 2)))
|
||||||
(add 375
|
(div v 2)) 1 "rgba(114,222, 194,0.1)")
|
||||||
(mul
|
(rec (sub v 0.3)))))
|
||||||
(cos
|
;
|
||||||
(add
|
(defn redraw () (
|
||||||
(div v 17)
|
(clear)
|
||||||
(div
|
(rec 300)
|
||||||
(time) 2000)))
|
))
|
||||||
(div v 2)))
|
;
|
||||||
(add 300
|
(on "animate" redraw)
|
||||||
(mul
|
|
||||||
(sin
|
|
||||||
(div v 11))
|
|
||||||
(div v 2)))
|
|
||||||
(div v 2)) 1 "rgba
|
|
||||||
(114,222, 194,0.1)")
|
|
||||||
(rec
|
|
||||||
(sub v 0.3)))))
|
|
||||||
; set false to stop
|
|
||||||
(animate true)
|
|
||||||
(rec 300)
|
|
Loading…
x
Reference in New Issue
Block a user