updated dejong example

This commit is contained in:
Quentin Leonetti 2019-07-14 07:46:04 +02:00
parent 1c50f62681
commit 70ac8f2aa7

View File

@ -1,11 +1,11 @@
( (
(clear) (clear)
(def point (lambda (x y color) (stroke (circle x y 1) 1 color))) (def point (lambda (x y color) (stroke (circle x y 0.1) 1 color)))
(def _dejong (lambda (x y a b c d) (def _dejong (lambda (x y a b c d)
(rest ((point (rest ((point
(add 200 (mul 50 x)) (add 700 (mul 100 x))
(add 200 (mul 50 y)) (add 400 (mul 100 y))
"red") "rgba(255,0,0,1)")
(add (sin (mul a y)) (mul x (cos (mul b x)))) (add (sin (mul a y)) (mul x (cos (mul b x))))
(add (mul x (sin (mul x c))) (cos (mul d y))) (add (mul x (sin (mul x c))) (cos (mul d y)))
)) ))
@ -22,6 +22,5 @@
(2 1) (2 1)
) )
)) ))
(dejong 32000 1.4 -2.3 2.4 -2.1)
(dejong 4000 1.4 -2.3 2.4 -2.1)
) )