[fluxus] vector->list ?
Claude Heiland-Allen
claudiusmaximus at goto10.org
Tue Jul 11 22:30:02 PDT 2006
Hi all,
I tried to do something like this:
;-----------
(define (point-func v)
(let ((l (vector->list v)))
(let ((x (car l)) (y (car (cdr l))) (z (car (cdr (cdr l)))))
(vector (f1 x y z) (f2 x y z) (f3 x y z))
)
)
)
(define (point-iter n)
(pdata-set "t" n (point-func (pdata-get "t" n)))
(if (< n 1) 0 (point-iter (- n 1)))
)
;-----------
and got error messages like:
ERROR: Wrong type (expecting non-uniform array): #f32(0.0 0.0 0.0)
I found a method that works, which is actually more human-readable:
;-----------
(let ((x (vdot v (vector 1 0 0)))
(y (vdot v (vector 0 1 0)))
(z (vdot v (vector 0 0 1))))
...
)
;-----------
but I was wondering whether there was something to directly index a vector?
Anyway, here are some images (well, one so far) made with texture
warping, plus the texture I used:
http://claudiusmaximus.goto10.org/index.php?page=gallery/digital/cyclepix
(code forthcoming as soon as I remember how to save it ;-)).
Claude
--
http://claudiusmaximus.goto10.org
More information about the Fluxus
mailing list