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

on.convex.hull

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


Description

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) lay on the convex hull of tri.obj.

Usage

on.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.

Author(s)

A. Gebhardt

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

Examples

# example from TRIPACK:
data(tritest)
tr<-tri.mesh(tritest$x,tritest$y)
on.convex.hull(tr,0.5,0.5)
on.convex.hull(tr,c(0.5,-1,1),c(0.5,1,1))
# use a part of the quakes data set:
data(quakes)
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")
on.convex.hull(q.tri,quakes.part$lon[1:20],quakes.part$lat[1:20])

tripack

Triangulation of Irregularly Spaced Data

v1.3-9.1
ACM | file LICENSE
Authors
Fortran code by R. J. Renka. R functions by Albrecht Gebhardt <albrecht.gebhardt@aau.at>. With contributions from Stephen Eglen <stephen@anc.ed.ac.uk>, Sergei Zuyev <sergei@stams.strath.ac.uk> and Denis White <white.denis@epamail.epa.gov>
Initial release
2020-03-06

We don't support your browser anymore

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