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!