Forums > MaxMSP

comparing coordinates

Apr 04 2013 | 1:48 pm

I have 10 different inputs, each have an x and y coordinate.
However, the coordinates of some inputs seem to be very close together. (the difference is less then 10 on either the x or y coordinate)
If this is the case, I want those inputs be seen as one.
For example the 10 different inputs can become 7 inputs if some coordinates are almost the same.
Does anyone have a clue on the programming?

-- Pasted Max Patch, click to expand. --

Apr 04 2013 | 2:23 pm

i dont understand it : "If this is the case, I want those inputs be seen as one."

do you want to hide elements ?

Apr 04 2013 | 3:05 pm

yes, combine instead of hide. or substitute.

the thing is for instance
sensor 1:
x= 10
y= 20

sensor 2:
x= 10
y= 25

Both are almost the same (so the difference between both x’s and y’s < =10) so then I want them to be put together. So I will then only have 9 input coordinates left.

Apr 04 2013 | 3:12 pm

i can write it in javascript if you want ,because there would be a mess on a screen . let me know

Apr 04 2013 | 3:23 pm

I’ll see if I can program a way around it.
Thanks anyway!

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > MaxMSP