initial release

This commit is contained in:
2017-03-08 21:55:02 +01:00
parent 6a8a51bee4
commit 1be6829173
5 changed files with 13 additions and 1764 deletions

4
README.md Normal file
View File

@@ -0,0 +1,4 @@
# shinu
Playing around with [snek](https://github.com/inconvergent/snek).
Not much going on here yet.

BIN
examples/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
out.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -8,17 +8,19 @@
(defmacro rand () `(random 1.0))
(defun rand-rgba ()
(list (rand) (rand) (rand) (rand)))
(list (rand) (rand) (rand) 1.0))
(defun main ()
(let ((mid (* *size* .5))
(repeat (random 100))
(grains (random 10))
(itt (random 5000))
(sand (sandpaint* *size* :active (rand-rgba) :bg (rand-rgba))))
(let* ((mid (* *size* .5))
(repeat (random 100))
(grains (random 10))
(itt (random 5000))
(bg (rand-rgba))
(active (rand-rgba))
(sand (sandpaint* *size* :active active :bg bg)))
(loop for i in (linspace 100 900 repeat)
for j from 1 to repeat do
(print j)
(format "~d/~d (~d)~%" j repeat (/ j repeat))
(let ((snk (snek*))
(va (list 0 0))
(vb (list 0 0))