add glitch example

This commit is contained in:
Quentin Leonetti 2019-07-15 22:11:39 +02:00
parent 90e7b52867
commit 2e4dcf08d8

24
examples/glitch.lisp Normal file
View File

@ -0,0 +1,24 @@
; pixels
(
(clear)
; Filter
(defn glitch
(rec)
(if (gt rec 1)
((clone
(rect (random 400) (random 400) 2 2)
(rect (random 400) (random 400)
(random 10) (random 30)))
(glitch (sub rec 1))))
)
; Draw photo
(draw
"../static/crystal.jpg"
(rect 0 0 400 400)
(lambda () (glitch 2000)))
)