How to determine if two vectors intersect in 3D space

844 Views Asked by At

I have two triangles in 3D space with a shared edge. I need to determine if the triangles exist on the same plane. To do this, I need to determine if the vector between the unshared points (P1 -> P4) bisects the shared edge (P2 -> P3).

How do I perform this comparison?

Two triangles with shared edge

1

There are 1 best solutions below

0
On

To find out if a system describing intersection of two vectors has a solution and it satisfy a condition to lie somewhere between the corners, is not an elegant and simple method. Better compare normal vectors or zero tetrahedron volume. Cross product simplifies a lot. And simple check if P4 lies in the plane P1P2P3 also suffices.

http://www.had2know.com/academics/tetrahedron-volume-4-vertices.html https://stackoverflow.com/questions/9866452/calculate-volume-of-any-tetrahedron-given-4-points https://en.wikipedia.org/wiki/Tetrahedron No need for "tones" of googling, just the right idea, other methods at the end leads to the same formula.