- 2

- 0

My initial idea is to assume the plane is infinite and find the distance. I would then determine if the closest point in the plane lay within the triangle (but was not sure how I was going to do that). If it was then I was done. If not, then I would find which of the 3 line segements of the triangle lay closest to the point in the plane and use Pythagoras to figure out the distance between my original point in space and the triangle.

Any advice about this or any other method would be greatly appreciated. Also, I am performing these calculations in matlab so any suggestion on how to optimize my code would be very helpful as well. Thanks!