1

I am trying to find a nice formulation on how to calculate the distance between a point $(p_1, p_2, p_3)$ and a triangle in 3D, where the triangle is non flat (Strictly speaking it is not a triangle anymore, but I don't know the correct term for this). The coordinates of all vertices $(v_1, v_2, v_3)$ of the triangle are in the range between zero and one.

To construct the curved triangle from a normal triangle the square root of z from each vertex is calculated and replaces the prior z value:

$v_i[2] = \sqrt{v_i[2]}$

EDIT: Every point on the triangle is also transformed the same way, thus resulting in this curvature.

For flat triangles I have used something similar to this: Distance Between Point and Triangle in 3D.pdf.

I appreciate any help even pointers on how to best tackle this problem are appreciated.

Thanks for your help!

  • I'm not sure what you mean by it's not a triangle anymore. Even if you substitute $z$ for its square root for every vertex it's still going to be a triangle. Do you mean substituting for every point in the triangle, not only the vertexes? – blundered_bishop Sep 01 '21 at 19:47
  • Isn't it $v_i[2] = \sqrt{v_i[1]}$ ? 2) You explain how to compute the new $z$ for the vertices, but haow are computed th new $z$ for any interior point of the triangle ?
  • – Jean Marie Sep 01 '21 at 20:07
  • Hey blundered_bishop, yes every point of the triangle is also transformed, sorry I should have specified that as well. – M. Denninger Sep 02 '21 at 07:54
  • Hey Jean Marie, every point on the triangle gets the same treatment. – M. Denninger Sep 02 '21 at 07:55