From 3cca9a2da96a76a1fb54fa886833a2f5769a5d9e Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sun, 14 Jul 2019 06:58:28 +0200 Subject: [PATCH] add dejong script --- examples/dejong.lisp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/dejong.lisp diff --git a/examples/dejong.lisp b/examples/dejong.lisp new file mode 100644 index 0000000..9b7bdd6 --- /dev/null +++ b/examples/dejong.lisp @@ -0,0 +1,22 @@ +( + (clear) + (def point (lambda (x y color) (stroke (circle x y 1) 1 color))) + (point 50 50 "red") + (point 50 150 "red") + (def dejong (lambda (i x y a b c d) + (if (gt i 0) + ( + (point + (add 200 (mul 50 x)) + (add 200 (mul 50 y)) + "red") + (dejong + (sub i 1) + (add (sin (mul a y)) (mul x (cos (mul b x)))) + (add (mul x (sin (mul x c))) (cos (mul d y))) + a b c d) + ) + (echo "done")) + )) + (dejong 800 40 40 1.4 -2.3 2.4 -2.1) +)