intersectionCircleLine: Intersection of a circle and a line

Description Usage Arguments Value Examples

View source: R/Intersections.R

Description

Return the intersection of a circle and a line.

Usage

1

Arguments

circ

a Circle object

line

a Line object

strict

logical, whether to take into account line$extendA and line$extendB if they are not both TRUE

Value

NULL if there is no intersection; a point if the infinite line is tangent to the circle, or NULL if strict=TRUE and the point is not on the line (segment or half-line); a list of two points if the circle 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

1
2
3
4
circ <- Circle$new(c(1,1), 2)
line <- Line$new(c(2,-2), c(1,2), FALSE, FALSE)
intersectionCircleLine(circ, line)
intersectionCircleLine(circ, line, strict = TRUE)

PlaneGeometry documentation built on Aug. 7, 2020, 1:06 a.m.