Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

whichhalfplane

Test Which Side of Infinite Line a Point Falls On


Description

Given an infinite line and a spatial point location, determine which side of the line the point falls on.

Usage

whichhalfplane(L, x, y = NULL)

Arguments

L

Object of class "infline" specifying one or more infinite straight lines in two dimensions.

x,y

Arguments acceptable to xy.coords specifying the locations of the points.

Details

An infinite line L divides the two-dimensional plane into two half-planes. This function returns a matrix M of logical values in which M[i,j] = TRUE if the jth spatial point lies below or to the left of the ith line.

Value

A logical matrix.

Author(s)

See Also

Examples

L <- infline(p=runif(3), theta=runif(3, max=2*pi))
  X <- runifrect(4)
  whichhalfplane(L, X)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.