Given an infinite line and a spatial point location, determine which side of the line the point falls on.
whichhalfplane(L, x, y = NULL)
Object of class "infline"
specifying one or more
infinite straight lines in two dimensions.
Arguments acceptable to xy.coords
specifying the locations of the points.
A logical matrix.
An infinite line M
of logical values
in which M[i,j] = TRUE
if the j
th spatial point
lies below or to the left of the i
th line.
# NOT RUN {
L <- infline(p=runif(3), theta=runif(3, max=2*pi))
X <- runifrect(4)
whichhalfplane(L, X)
# }
Run the code above in your browser using DataLab