I have code of finding the perpendicular distance from a point to a 3D plane. But in this case, the plane is infinite. If the plane is not infinite, but limited to a certain piece, such as the face of an object, then how to find the minimum distance from a point to that face?
An example:
If the 3 points defining a "piece" of plane are:
1 0 0
0 1 0
0 0 0
And the query point is:
1 1 1
Then the answer will be .
Is there any implementation in C++ for this problem? If yes, then could someone please provide it? And if not, then sharing the idea of solving it will also help. Thanks in advance.