[Fluxus] Referencing (gh 1) in (every-frame)

gabor papp gabor.lists at mndl.hu
Tue Sep 8 21:42:32 PDT 2009


hi Henderson,

> In other news, another simple thing I was playing with from the tutorial pdf
> is attached - but I was trying to realise how to make the (gh 1) in the
> pdata deform reset to zero rather than be cumulative? Does it have to be
i would not do this to (gh). the attached script works cumulatively 
because you reuse the old value of "p" from the previous frame and add a 
random number to it. if you always start from the original p value, you 
can achieve what you want.
for example:

(clear)

(define myob (build-sphere 20 20))

(with-primitive myob
     ; save original "p"
     (pdata-copy "p" "p0"))

(every-frame
   (with-primitive myob
       (pdata-map!
         (lambda (p p0)
           (vadd (vmul (rndvec) (gh 1)) p0))
         "p" "p0")))


i hope this answers your question.

best,
gabor




More information about the Fluxus mailing list