Given a single point in 3d space, and 3 points that make up a triangle, find the closest point in/on the triangle to the point.

136 Views Asked by At

Given point $(p,q,r)$ and 3 points which make up a triangle, find the closest point in the triangle to the point in space. From the triangle, we can find the equation of the plane $Ax+By+Cz+d=0.$

EDIT: I am trying to ask a similar form of my other question, but in a more general form. I need to program a solution to this problem for any scenario. See comment below