# Given two arbitrary surfaces, what is the accurate and quite fast algo to find collision within X distance?

I have two high-resolution 3D objects(femur and patella) with arbitrary smooth surface and I want to find the contact point/area between those two objects. Accuracy is more important than computation time in this case, though it would be great if the algorithm has relatively low computation time. Also, it would be great if the contact between two objects can be represented with surface/point penetration distance, e.g. if distance between two points/triangles/areas <= x distance, then there is collision, while x can be non-zero. Is there any collision algorithm that satisfy above requirement?

• convex object of are there concave parts? – ratchet freak Jan 3 '17 at 14:16
• @ratchetfreak I uploaded the pic of the objects. :) Just curious, what is your consideration by asking that question? – Bla... Jan 3 '17 at 14:31
• seeing if the GJK algorithm would work. It requires convex objects. – ratchet freak Jan 3 '17 at 14:37
• I think a typical approach would be to use a BSP tree to split the object into concave parts, then use BVH sweep and prune (broad-phase) + GJK (narrow-phase) to get exact collision. – Nathan Reed Jan 4 '17 at 22:23
• @Bla... You can inflate all the bounding boxes (or bounding spheres or whatever) by the tolerance, or build the tolerance into the broad-phase intersection tests. – Nathan Reed Jan 5 '17 at 1:53