How to compute the *vertical* distance between a point and a triangle in 3D?

662 Views Asked by At

The point is either above or under the triangle i.e. if you project the point and the triangle on the ground, the point lies in the triangle.

I want the distance DD' (in dark red) on the Z axis of the point to the triangle given the carthesian coordinates of A, B, C and D. See diagram. Z is used as the altitude, it's placed correctly on the diagram.

diagram

1

There are 1 best solutions below

2
On BEST ANSWER

Compute $$\frac{(D-A)\cdot n}{e_3\cdot n}$$ where $n=(B-A)\times (C-A)$.