in.convex.hull

0th

Percentile

Determines if points are in the convex hull of a triangulation object

Given a triangulation tri.obj of $n$ points in the plane, this subroutine returns a logical vector indicating if the points $(x_i,y_i)$ are contained within the convex hull of tri.obj.

Usage
in.convex.hull(tri.obj, x, y)
Arguments
tri.obj
object of class "tri"
x
vector of x-coordinates of points to locate
y
vector of y-coordinates of points to locate
Value

  • Logical vector.

References

R. J. Renka (1996). Algorithm 751: TRIPACK: a constrained two-dimensional {Delaunay} triangulation package. ACM Transactions on Mathematical Software. 22, 1-8.

See Also

tri, print.tri, plot.tri, summary.tri, triangles, add.constraint, convex.hull.

Aliases
  • in.convex.hull
Examples
# example from TRIPACK:
tr<-tri.mesh(tritest$x,tritest$y)
in.convex.hull(tr,0.5,0.5)
in.convex.hull(tr,c(0.5,-1,1),c(0.5,1,1))
# use a part of the quakes data set:
quakes.part<-quakes[(quakes[,1]<=-10.78 & quakes[,1]>=-19.4 &
                     quakes[,2]<=182.29 & quakes[,2]>=165.77),]
q.tri<-tri.mesh(quakes.part$lon, quakes.part$lat, duplicate="remove")
in.convex.hull(q.tri,quakes$lon[990:1000],quakes$lat[990:1000])
Documentation reproduced from package tripack, version 1.0-1, License: R functions: GPL, Fortran code: available at netlib

Community examples

Looks like there are no examples yet.