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

henderson five hendersonfive at gmail.com
Wed Sep 9 00:48:45 PDT 2009


Ah great, thanks again for the help!

On Wed, Sep 9, 2009 at 5:42 AM, gabor papp <gabor.lists at mndl.hu> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20090909/e024a4ae/attachment.html>


More information about the Fluxus mailing list