PROJPOINTONLINE Project of a point orthogonally onto a line.
PT2 = projPointOnLine(PT, LINE).
Computes the (orthogonal) projection of point PT onto the line LINE.
Function works also for multiple points and lines. In this case, it
returns multiple points.
Point PT1 is a [N*2] array, and LINE is a [N*4] array (see createLine
for details). Result PT2 is a [N*2] array, containing coordinates of
orthogonal projections of PT1 onto lines LINE.
Example
line = [0 2 2 1];
projPointOnLine([3 1], line)
ans =
2 3
See also:
lines2d, points2d, isPointOnLine, linePosition
---------
author : David Legland
INRA - TPV URPOI - BIA IMASTE
created the 07/04/2005.
Package: matgeom