Well I tough I was illiterate in fluxus, but now I am sure of it ;)

you are right I want to slow down the generation of the pattern, in an exponential way so that the generation start fast and ease out, slowing down toward the end. So iteration 1 would have a 0.1 delay then 0.11 or something like that.

I don't understand the usage of seed in there, and I am not sure why the code you added is located there (and not in the actual pattern generation). Is there a fluxus example I could toy with ? The code you modify couldn't be run as is..

thanks again

On Sun, 10 Jul 2011, gabor papp wrote:

hi,

I am wondering how to 'slow down' during a loop.
i assume you want to slow down the pattern generation not the rotation. there are many ways probably, the first that came into my mind checks how much time is passed and if it's bigger then a threshold it sets the random seed and increases the threshold.

best,
gabor

----

(define s (time))
(define ds 0.001)
(define seed 0)

(define (cloud num)
   (cond
       ((not (zero? num))
           (draw-sphere)
           (translate (vector 0 (* 2 (grndf)) (* 2 (grndf))))
           (colour (vector (* (sin (time))  (/ num 100)) (/ num 100) num))
           (cloud (- num 1)))))

(define (rotate-cloud)
   (when (> (- (time) s) ds)
       (set! s (time))
       (set! seed (+ seed 1))
       (set! ds (* 1.1 ds)))
   (random-seed seed)

   (with-state
       (rotate (vector 0 (* 10 (time)) 0 ))
       (cloud 300)))

(every-frame
   (rotate-cloud))


Reply via email to