[Fluxus] pdata-op "closest"
gabor papp
gabor.lists at mndl.hu
Mon Aug 25 00:12:37 PDT 2008
i am playing with particles. i can read the position of the closest
particle to each particle by using (pdata-op "closest" "p" i), where 'i'
is the particle index.
i am also trying to read the colour value of the closest pdata, but it
didn't work. (pdata-op "closest" "c" i) :
ClosestOperator has no operator for types:
PN6Fluxus10TypedPDataINS_7dColourEEE and f expected vector (size 3)
value in pdata-set
because "closest" can be used with either a vector or an index, i was
thinking that maybe if i submit a vector i get back and index that could
be used to retrieve the colour value, like:
(let* ((v (pdata-op "closest" "p" i))
(c (pdata-ref "c" (pdata-op "closest" "p" v)))))
...)
but it returned a vector in both cases. or wouldn't it make sense to use
"closest" with any kind of pdata? i suppose other pdata-op's can be used
with any kinds of pdata as long as their type matches to the operator.
could you suggest a method how i could do this? thanks in advance.
gabor
More information about the Fluxus
mailing list