From: Edwin on 8 Jul 2010 11:05 Hello everyone, We know how to determine the shortest distance from a point to a line. http://www.mathworks.com/support/solutions/en/data/1-1BYSR/index.html?product=ML&solution=1-1BYSR However, can someone point me of a way of how to determine if such minimum distance fall within the line segment or it is determine it with respect to its projection. for example for the line line=[-15 -30 -50 75 -70 95] point=[0 0] for the first segment of the line the shortest distance (perpendicular distance) falls within the line segment but for the second segment the shortest distance is determine it with respect the line projection. So How could I know when each case is happening. Thanks in advance
From: Jan Simon on 8 Jul 2010 11:43 Dear Edwin, > line=[-15 -30 > -50 75 > -70 95] Is this a [3 x 2] matrix? How is the "line" defined by these values? 2 points or one point a orientation vector? However, find the point, where the shortest distance between the point and the line touchs the line. Then determine, in this point is between the two points defining the line. I do not want to solve a homework, but of course you can get comments for all what you have done so far. Kind regards, Jan
From: Roger Stafford on 8 Jul 2010 18:04 "Edwin " <onest30(a)gmail.com> wrote in message <i14pf1$41k$1(a)fred.mathworks.com>... > Hello everyone, > We know how to determine the shortest distance from a point to a line. > > http://www.mathworks.com/support/solutions/en/data/1-1BYSR/index.html?product=ML&solution=1-1BYSR > > However, can someone point me of a way of how to determine if such minimum > distance fall within the line segment or it is determine it with respect to its projection. > > for example for the line > line=[-15 -30 > -50 75 > -70 95] > > point=[0 0] > > for the first segment of the line the shortest distance (perpendicular distance) > falls within the line segment but for the second segment the shortest distance is determine it with respect the line projection. So How could I know when each case is happening. > > Thanks in advance - - - - - - - - - Suppose A and B are the two endpoints of your line segment and C is the point you are asking about. Now consider the triangle ABC. If the perpendicular projection of C onto line AB lies within segment AB, what can you say about the two angles CAB and CBA? You don't even have to find the point of projection of C onto AB in order to answer that easy question. I DOT if you will have any trouble with this. :-) Roger Stafford
|
Pages: 1 Prev: open all sites free now Next: Find angle between two lines |