[Fluxus] how to get the local rotation of a primitive as a vector??

Rob Bothof rbothof at xs4all.nl
Tue Jan 26 12:13:23 PST 2010


>
> Hi Rob,
>
> This looks great - it would be good to have boids in the fluxus
> examples :)
>   

Hej Dave,

cool, once i have this local coordination working and some decent code 
for behauviors i'd be happy to share it as a fluxus example

> Something else related to this that might be useful to know is that the
> top 3 vectors in a matrix are the 3 vectors representing the directions,
> eg:
>
>   
thanx! this clears things up a lot!
so m 12, m 13 and m14 then present the global position, nice :)
> (define (build-line a b)
>     (let ((p (build-ribbon 2)))
>         (with-primitive p
>             (hint-none) (hint-unlit) (hint-wire)
>             (pdata-set! "p" 0 a)
>             (pdata-set! "p" 1 b)) p))
>
> (define (draw-transform m)
>     (wire-colour (vector 1 0 0))
>     (build-line (vector 0 0 0) 
>         (vector
>             (vector-ref m 0)
>             (vector-ref m 1)
>             (vector-ref m 2)))
>     
>     (wire-colour (vector 0 1 0))
>     (build-line (vector 0 0 0) 
>         (vector
>             (vector-ref m 4)
>             (vector-ref m 5)
>             (vector-ref m 6)))
>     
>     (wire-colour (vector 0 0 1))
>     (build-line (vector 0 0 0) 
>         (vector
>             (vector-ref m 8)
>             (vector-ref m 9)
>             (vector-ref m 10))))
>
> (clear)
>
> (draw-transform (mident))
>
> (draw-transform 
>     (mmul
>         (mscale (vector 1 2 1))
>         (mrotate (vector 23 40 2))))
>
> cheers,
>
> dave
>
>   




More information about the Fluxus mailing list