ronin experiment 6 - event based animation

Nikolaus Gradwohl2019-07-23T04:44:49+00:00

ronin switched from an amiation loop to a event based animation system which allow cool stuff like initalizing code for the animation or reference objects that get preserved between frames. And it also makes it a lot easier to interact between the animation callback function and other event sources like osc events or mouseclicks

random circles

this is my first event based animation:

(def pos {:x 30 :y 30})

(defn draw () (
(times 10 (lambda (a) (
(def r (mul a (mod (time 0.02) 40)))
(circle (of pos :x) (of pos :y) r)
(sub 11 a) "white")

(if (lt (mod (time 0.02) 40) 1) (
 (set pos :x (random (of (frame) :w)) :y (random (of (frame) :h)))

(on "animate" draw)
Tweet This! submit to reddit Digg! Tags: | no comments | no trackbacks

See also:

Ronin experiment 21 - morphing lissajous states
ronin experiment 20 - transform flower
ronin experiment 19 - Sonic Pi visualizer
Ronin experiment 18 - Rainbow
Ronin experiment 17 - boids



Leave a response

Leave a comment