# Moving vertices of two objects away from each other

Consider having two (multiple) objects that are very close to each other. Is there any algorithm which can identify vertices of these objects that their distances are less than a tolerance and then move those vertices away from each other until the defined tolerance is reached? the figure is a 2D representation of the problem which is actually in 3d space.

• Gonna need more information on this. How many vertices are you talking about? Can you create a diagram image to show what you mean? – bertmoog Sep 15 '17 at 18:06
• please look at the updated image – Benancio Sep 15 '17 at 18:23
• Yes, I understand the tolerance factor, but I'm assuming you don't mean two one-vertex-objects. How many vertices are you talking about? All of the vertices of an object? Do you want the object to stay intact (i.e. keep it's form... be static)? Are you applying physics/rigid-body to the objects? Animating them? – bertmoog Sep 15 '17 at 18:57
• There are potentially multiple ways of doing this, you just need to narrow down the application. – bertmoog Sep 15 '17 at 19:16
• objects are static, each object has a few hundred vertices, a proximity query for each vertex of one objects with all vertices of surrendering objects can identify the vertices that are "close" to each other, then those pairs need to be distanced. however, they should not be distance too much since it is desired to keep the shape and volume of the objects intact. – Benancio Sep 15 '17 at 19:55