MEDIANLINE Create a median line between two points.
L = medianLine(P1, P2);
Create the median line of points P1 and P2, that is the line containing
all points located at equal distance of P1 and P2.
L = medianLine(PTS);
Creates the median line of 2 points, given as a 2*2 array. Array has
the form:
[ [ x1 y1 ] ; [ x2 y2 ] ]
L = medianLine(EDGE);
Creates the median of the edge. Edge is a 1*4 array, containing [X1 Y1]
coordinates of first point, and [X2 Y2], the coordinates of the second
point.
Example
% Draw the median line of two points
P1 = [10 20];
P2 = [30 50];
med = medianLine(P1, P2);
figure; axis square; axis([0 100 0 100]);
drawEdge([P1 P2], 'linewidth', 2, 'color', 'k');
drawLine(med)
% Draw the median line of an edge
P1 = [50 60];
P2 = [80 30];
edge = createEdge(P1, P2);
figure; axis square; axis([0 100 0 100]);
drawEdge(edge, 'linewidth', 2)
med = medianLine(edge);
drawLine(med)
See also:
lines2d, createLine, orthogonalLine
---------
author : David Legland
INRA - TPV URPOI - BIA IMASTE
created the 31/10/2003.
Package: matgeom