I have an uncommon problem. There are 2 3D objects, which are represented by arrays of vertices and triangles (.stl files). Each of them contains a big enough amount of vertices: 1-10 mln ones. The surfaces of these models are rough, and can contain different spikes or hollows.
The aim is to determine path of one these objects, when it moves with contact on the surface of the other one. Moreover, the algorithm should consider how many degrees of freedom are available. In every case there are only 2 objects and one of them is fixed.
M1 moves on a surface of object
M2, which is fixed. It's necessary to move M1 from point
B. For M1 it's also available one more degree of freedom - along the axis (let's call it
AC) perpendicular to
AB. So, the path can be only the curve in the plane
(AC, AB). But due to this path, during the motion
M1 should always has at least one contact point.
I tried to perform it with collision detection algorithm, but it seems it will be very complicated calculations for ordinary computers. Can anybody advise some algorithms, libraries or concepts how to perform this idea? P.S. I use C, C++ and Java.