[Fluxus] some advice

krgn k.gebbert at gmail.com
Sun Aug 24 15:45:16 PDT 2008


I would like to ask a question or two. I'm a bit puzzled with how shifting
around things in fluxus-space works, and I guess that the fact that my
vector maths isn't really good isn't helping, neither does my patchy
understanding of the statemachine :) I think I'm also pretty ancored in the
SuperCollider OOP way of thinking, so exploring Scheme means in many ways a
new steep learning curve.
The problem that I am frequently encountering is that I have (sets of)
objects that 'run away' from me, so to speak, and I have difficulty finding
values that produce intersting things one can actually see. I think that is
to do with the fact that translating objects uses vectors, rather than
coordinates. So in the example below I can see how the thing is running off
the scene. My question really is 1) could someone maybe explain quickly the
'unit' of the vectors i.e. if we have (vadd current-position (vector 0.1 0
0)) is the 0.1 simply a magnitude, or pixels? /me is puzzled :S .... 2) how
do people manage movement of objects so that they are on-screen doing things
and don't immediately wonder off?

sorry if this sounds really naive, it may well be :)

(clear-colour (vector 0.1 0.1 0.1))

(clear)
(reset-camera)

(hint-none)
(hint-wire)
(hint-vertcols)
(hint-solid)

(define numobs 10)

(define myobs (build-list numobs
    (lambda (object)
        (build-sphere 5 5))))

(define (init-object)
    (for-each
        (lambda (object)
            (with-primitive object
                (pdata-map!
                    (lambda (colour)
                        (vector (flxrnd) (flxrnd) (flxrnd)))
                    "c")))
        myobs))

(init-object)

(define (update-object)
    (for-each
        (lambda (object)
            (with-primitive object
                (pdata-map!
                    (lambda (pos)
                        (vsub pos (vmul pos (flxrnd))))
                    "p")))
        myobs))

(every-frame (update-object))

Thanks,

Karsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20080824/ff780e1e/attachment-0001.htm>


More information about the Fluxus mailing list