# 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? Commented Jan 3, 2017 at 14:16
• @ratchetfreak I uploaded the pic of the objects. :) Just curious, what is your consideration by asking that question? Commented Jan 3, 2017 at 14:31
• seeing if the GJK algorithm would work. It requires convex objects. Commented Jan 3, 2017 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. Commented Jan 4, 2017 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. Commented Jan 5, 2017 at 1:53