Contour problems

hello world, i have a question about the contour module ,
im trying to make some test simulating the input of different circles to track the position and each one with a different color, all works fine the track is robust and fast but the problem comes when i move one of the tracked objects in the y axis, for example i have a circle with coordinates x=0,5 y=0,2 an the other circle in x= -0,5 y= 0,1 well the thing is if i move the second circle in y and i get a position value over the other circle,y=0,4 it changes the order of the slices in the spread, so circle 2 pass to be circle 1 and circle 1 pass to be 2, in my case it change the color from one to another that its annoying for my purpose, there is any way to avoid this so i can keep the order of the slices without worry about position?
thanks to all

you could sort the IDs with Sort(Spreads), and then getslice the values you need with the Sort’s former index pin as the slice index. this way you should always get the values in the ID order.

doesn’t work that easy for the contour coordinates, you have to combine it with their bin size. if you need exactly this and are not succesfull, ask again ;)

i try it but i dont get it works, when i use sort in the id and the connect the former index to the slice index of a getslice with the y input and what happen is that when i move over position y then it start to move the other object because the index of the id is not the same of the y coordinates, there is no way if you sort the y coordinates spread because the you get wrong values, it needs to be an easy trick like it used to be with vvvv, the problem is ti find it out