diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9301bde --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +config.py +*.pyc +死ぬ.png diff --git a/examples/4/out23.png b/examples/4/out23.png new file mode 100644 index 0000000..2db5823 Binary files /dev/null and b/examples/4/out23.png differ diff --git a/examples/4/out24.png b/examples/4/out24.png new file mode 100644 index 0000000..99d0f46 Binary files /dev/null and b/examples/4/out24.png differ diff --git a/examples/4/out25.png b/examples/4/out25.png new file mode 100644 index 0000000..c7d1cd5 Binary files /dev/null and b/examples/4/out25.png differ diff --git a/examples/4/out26.png b/examples/4/out26.png new file mode 100644 index 0000000..e701e11 Binary files /dev/null and b/examples/4/out26.png differ diff --git a/examples/4/out27.png b/examples/4/out27.png new file mode 100644 index 0000000..57202b6 Binary files /dev/null and b/examples/4/out27.png differ diff --git a/examples/5.png b/examples/5.png new file mode 100644 index 0000000..350c3ec Binary files /dev/null and b/examples/5.png differ diff --git a/examples/6.png b/examples/6.png new file mode 100644 index 0000000..762c54d Binary files /dev/null and b/examples/6.png differ diff --git a/shinu.lisp b/shinu.lisp index 8d8b986..3071332 100755 --- a/shinu.lisp +++ b/shinu.lisp @@ -3,8 +3,8 @@ (setf *random-state* (make-random-state t)) -(defvar *file* "out~a.png") -(defvar *size* 1000) +(defvar *file* "死ぬ.png") +(defvar *size* (+ 500 (random 2000))) (defmacro rand () `(random 1.0)) @@ -13,20 +13,20 @@ (defun main () (let* ((mid (* *size* .5)) - (repeat (random 25)) + (repeat (random 10)) + (offset (random 100)) (grains (random 10)) (itt (random 2000)) (bg (rand-rgba 1.0)) (active (rand-rgba 0.6)) (sand (sandpaint* *size* :active active :bg bg))) - (loop for i in (linspace 100 900 repeat) - for j from (- repeat 5) to repeat do - (format t "~a/~a (~a)~%" j repeat (* 1.0 (/ j repeat))) + (loop for i in (linspace 100 (- *size* 100) repeat) + for j from offset to (+ offset repeat) do (let ((snk (snek*)) (va (list 0 0)) (vb (list 0 0)) - (p1 (list 100 i)) - (p2 (list 900 i))) + (p1 (list (random 100) i)) + (p2 (list (random (- *size* 100)) i))) (loop for k from 1 to itt do (let ((v1 (insert-vert (l-on-line k itt p1 p2) into snk)) @@ -41,7 +41,8 @@ (join-verts v1 v2)) (sandpaint-edges sand snk grains) - (sandpaint-verts sand snk) - (sandpaint-save sand (format nil *file* j)))))))) + (sandpaint-verts sand snk))))) + + (sandpaint-save sand *file*))) (main) diff --git a/tweet.py b/tweet.py new file mode 100644 index 0000000..fd7ab78 --- /dev/null +++ b/tweet.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +import twitter +import config + +api = twitter.Api(consumer_key=config.consumer_key, + consumer_secret=config.consumer_secret, + access_token_key=config.access_token_key, + access_token_secret=config.access_token_secret) + +api.PostUpdate("", media=u"死ぬ.png") diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..772da39 --- /dev/null +++ b/update.sh @@ -0,0 +1,2 @@ +sbcl --script shinu.lisp +python tweet.py