add random example script
This commit is contained in:
parent
c81a0a8c96
commit
90e7b52867
BIN
desktop/static/crystal.jpg
Normal file
BIN
desktop/static/crystal.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 152 KiB |
20
examples/random.lisp
Normal file
20
examples/random.lisp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
; random
|
||||||
|
|
||||||
|
(
|
||||||
|
(clear)
|
||||||
|
|
||||||
|
(defn place
|
||||||
|
(rec)
|
||||||
|
(if (gt rec 0)
|
||||||
|
((draw "../static/crystal.jpg"
|
||||||
|
(rect
|
||||||
|
(random 200)
|
||||||
|
(random 200)
|
||||||
|
(random 200)
|
||||||
|
(random 200))
|
||||||
|
(lambda () (place (sub rec 1)))
|
||||||
|
)))
|
||||||
|
)
|
||||||
|
|
||||||
|
(place 30)
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user