Note: I am an Engineering Undergrad with High School knowledge of Geometry
I am given three points in a Cartesian Co-ordinate System, how would I proceed to find the point closest to the origin on the perimeter of the triangle. A PseudoCode would always be appreciated, but even pointing me to the right direction would be sufficient.


Find out the equations of the sides of triangle Then find equations of normal to these sides passing through the origin. Find the intersection pts of the normal and the edges. The distance of the closest intersection point is your answer