comparing coordinates

Apr 4, 2013 at 1:48pm

comparing coordinates

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. –
#67526
Apr 4, 2013 at 2:23pm

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

do you want to hide elements ?

#242981
Apr 4, 2013 at 3:05pm

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.

#242982
Apr 4, 2013 at 3:12pm

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

#242983
Apr 4, 2013 at 3:23pm

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

#242984

You must be logged in to reply to this topic.