Skip to main content
2 of 4
added 347 characters in body

fast algorithm to check if a point is inside/outside mesh

Usually a ray casting algorithm is used to determine whether a point is indide or outside a mesh. But this algorithm is slow. Is there any fast algorithm to do this check? My input mesh is a triangular closed mesh. This question has been previously asked here: https://stackoverflow.com/questions/6554313/algorithm-for-determining-whether-a-point-is-inside-a-3d-mesh . The author solved the problem, but I don't understand the solution he/she provided.

Update: there's another method mentioned in https://www.reddit.com/r/Houdini/comments/u2co9i/the_most_efficient_way_to_test_if_a_point_is/. The algorithm is to find a nearest point on mesh, let's call the B, and the point A. The algorithm simply tests the dot product of AB and the normal of B. What's the potential downside of this algorithm?