From 82080c35fd053e91db9cf1f86e36cb452533979d Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 20 Jul 2019 16:16:33 +0900 Subject: [PATCH] Ported spiral --- examples/g_spiral1.lisp | 29 ----------------------------- examples/spiral.lisp | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 29 deletions(-) delete mode 100644 examples/g_spiral1.lisp create mode 100644 examples/spiral.lisp diff --git a/examples/g_spiral1.lisp b/examples/g_spiral1.lisp deleted file mode 100644 index 0fc82e6..0000000 --- a/examples/g_spiral1.lisp +++ /dev/null @@ -1,29 +0,0 @@ -; animated recusive spiral -; by @local_guru -( - (def start (get ronin "animate")) - (clear) - (defn rec - (v) - (if (gt v 0) - ((stroke - (circle - (add 300 - (mul (cos (add (div v 17) (div (time) 2000))) - (div v 2) - ) - ) - (add 300 - (mul (sin (div v 11)) - (div v 2) - ) - ) - (div v 2)) - 1 "rgba(255,255,255,0.1") - (rec (sub v 0.3)) - ) - ) - ) -(start) -(rec 300) -) diff --git a/examples/spiral.lisp b/examples/spiral.lisp new file mode 100644 index 0000000..d430d70 --- /dev/null +++ b/examples/spiral.lisp @@ -0,0 +1,30 @@ +; animated recusive spiral +; by @local_guru +( + (clear) + (defn rec + (v) + (if + (gt v 0) + ( + (stroke + (circle + (add 300 + (mul + (cos + (add + (div v 17) + (div + (time) 2000))) + (div v 2))) + (add 300 + (mul + (sin + (div v 11)) + (div v 2))) + (div v 2)) 1 "#fff") + (rec + (sub v 0.3))))) + ; set false to stop + (animate true) + (rec 300)) \ No newline at end of file