The line splits in a positive and a negative side. A point with Cartesian coordinates is on the positive side of l, iff a px + b py + c > 0, it is on the negative side of l, iff a px + b py + c < 0. The positive side is to the left of l.
| |
introduces a line l with the line equation in
Cartesian
coordinates .
| |
| |
introduces a line l passing through the points and .
Line l is directed from to .
| |
| |
introduces a line l passing through point with
direction .
| |
| |
introduces a line l passing through point and
oriented by .
| |
| |
introduces a line l supporting the segment ,
oriented from source to target.
| |
| |
introduces a line l supporting the ray ,
with same orientation.
|
|
| Test for equality: two lines are equal, iff they have a non empty intersection and the same direction. | ||
|
| Test for inequality. | ||
|
| returns the first coefficient of . | ||
|
| returns the second coefficient of . | ||
|
| returns the third coefficient of . | ||
|
| returns an arbitrary point on l. It holds point(i) == point(j), iff i==j. Furthermore, l is directed from point(i) to point(j), for all i j. | ||
|
| |||
returns the orthogonal projection of onto l. | ||||
|
|
returns the -coordinate of the point at l with
given -coordinate.
| ||
|
|
returns the -coordinate of the point at l with
given -coordinate.
|
|
| line l is degenerate, if the coefficients a and b of the line equation are zero. |
|
|
|
|
|
|
|
| |
returns ON_ORIENTED_BOUNDARY, ON_NEGATIVE_SIDE, or the constant ON_POSITIVE_SIDE, depending on the position of relative to the oriented line l. |
For convenience we provide the following Boolean functions:
|
|
|
|
| |
|
|
|
| returns a vector having the direction of l. |
|
| returns the direction of l. |
|
| returns the line with opposite direction. |
|
| |
returns the line perpendicular to l and passing through , where the direction is the direction of l rotated counterclockwise by 90 degrees. | ||
|
| |
returns the line obtained by applying on a point on l and the direction of l. |
Point_2< Cartesian<double> > p(1.0,1.0), q(4.0,7.0);
To define a line we write:
Line_2< Cartesian<double> > l(p,q);