Let's take a look on the process to get the formula. Let say point S1 is the point on the line l which gives the shortest distance from point S to the line. As such, a right triangle PS1S is formed. The distance of SS1 (the shortest distance) can be found using the Pythagoras theorem:
The graph below is meant to show the distance from a point to a line. Move point P or T to move the line; move point S to see the changes of the right triangle. Either point will give changes to the distance. The coordinates of points P, S, initial point of v and terminal point of v are given. You may check if the vectors in the calculation are correct (sorry for the minor rounding errors inside).
No comments:
Post a Comment