From 2e4dcf08d8efd560bccb42aaa8766b15a838b5ce Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Mon, 15 Jul 2019 22:11:39 +0200 Subject: [PATCH] add glitch example --- examples/glitch.lisp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/glitch.lisp diff --git a/examples/glitch.lisp b/examples/glitch.lisp new file mode 100644 index 0000000..6804bc2 --- /dev/null +++ b/examples/glitch.lisp @@ -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))) +) \ No newline at end of file