MGH_LINE_COEFF
Name
MGH_LINE_COEFF
Description
Given a pair of points in an X-Y plane, return the coefficients
of the equation ax + by + c = 0 defining a line through the
points.
This is a utility function used in describing polygon-clipping
operations. See MGH_POLYFILLG.
Calling Sequence
result = mgh_mgh_line_coeff(x0, y0, x1, y1)
Positional Parameters
x0,y0,x1,y1 (input, numeric scalar)
Coordinates of points (x0,y0) and (x1,y1)
Return Value
The function returns a 3-element numeric vector containing the
coefficients of the line. The sign of the coefficents is such
that quantity s = (ax + by + c) increases to the right of the
vector (x0,y0) -> (x1,y1)
Modification History
Mark Hadfield, 2002-08:
Written
Mark Hadfield, 2015-02:
- Moved to Motley library, where it should have been all along.
- Source code updated/