intersectionEllipseLine {PlaneGeometry} | R Documentation |
Intersection of an ellipse and a line
Description
Return the intersection of an ellipse and a line.
Usage
intersectionEllipseLine(ell, line, strict = FALSE)
Arguments
ell |
an |
line |
a |
strict |
logical, whether to take into account |
Value
NULL
if there is no intersection;
a point if the infinite line is tangent to the ellipse, or NULL
if strict=TRUE
and the point is not on the line (segment or half-line);
a list of two points if the ellipse and the infinite line meet at
two points, when strict=FALSE
; if strict=TRUE
and the line is
a segment or a half-line, this can return NULL
or a single point.
Examples
ell <- Ellipse$new(c(1,1), 5, 1, 30)
line <- Line$new(c(2,-2), c(0,4))
( Is <- intersectionEllipseLine(ell, line) )
ell$includes(Is$I1); ell$includes(Is$I2)
[Package PlaneGeometry version 1.6.0 Index]