Volume of the intersection of two tetrahedra

2.9k Views Asked by At

First, I am far from a mathematician, and this question may be easy, if that's the case, please don't hesitate to let me know.

Suppose I have 2 tetrahedra (2 3D simplex), with known ABCD and DEFG coordinates in euclidean space.

Is there an algorithm/approach to known whether this tetrahedra intersect, and if so know the volume of that intersection in a general case?

I can imagine that the first question is not hard to solve, e.g. checking if the 4 vertices of a tetrahedron are inside the other one, but there may be smarter approaches, hence I will leave the question there.

EDIT: As pointed out in the comments, the intersection may be a bit more complicated than I assumed.

1

There are 1 best solutions below

1
On BEST ANSWER

Here is a method which is not optimal in terms of the number of things to check, but is easy to implement...

To detect ANY intersection between tetrahedrons A and B, you just have to make sure that A lies on the outside of any half-space defined by the 4 facets of B, and vice versa. If this is not the case, then there is an intersection. This test can be accomplished by the orient3d predicate give here. This is equivalent to applying the Hyperplane separation theorem. A faster method is here with code.

To compute the volume of intersection, you need the boundary representation of the intersection volume (in terms of vertices, edges, facets, etc. rather than intersection of halfspaces which doesn't tell you anything about the vertices and how they are connected). The most straightforward thing I can think of is to consider all 6 edges of B, and intersect them against A, resulting in 6 new, possibly shorter and non-connecting segments. The segment-tetrahedron intersection is very straightforward: intersect the segment against the plane containing the facet and keep the part that is on the interior. Now, consider the 12 endpoints of those 6 segments and compute the convex hull of those points. For this, I would use some existing library code like QHull. Alternatively you can try to implement it yourself using the incremental method or something else. The volume can be found by standard summation over facets once you have computed the intersection boundary representation.