Return the convex hull of a triangulation object

Given a triangulation tri.obj of \(n\) points in the plane, this subroutine returns two vectors containing the coordinates of the nodes on the boundary of the convex hull.

Keywords
spatial
Usage
convex.hull(tri.obj, plot.it=FALSE, add=FALSE,...)
Arguments
tri.obj

object of class triSht

plot.it

logical, if TRUE the convex hull of tri.obj will be plotted.

add

logical. if TRUE (and plot.it=TRUE), add to a current plot.

...

additional plot arguments

Value

x

x coordinates of boundary nodes.

y

y coordinates of boundary nodes.

See Also

triSht, print.triSht, plot.triSht, summary.triSht, triangles.

Aliases
  • convex.hull
Examples
# NOT RUN {
## random points:
rand.tr<-tri.mesh(runif(10),runif(10))
plot(rand.tr)
rand.ch<-convex.hull(rand.tr, plot.it=TRUE, add=TRUE, col="red")
## use a part of the quakes data set:
data(quakes)
quakes.part<-quakes[(quakes[,1]<=-17 & quakes[,1]>=-19.0 &
                     quakes[,2]<=182.0 & quakes[,2]>=180.0),]
quakes.tri<-tri.mesh(quakes.part$lon, quakes.part$lat, duplicate="remove")
plot(quakes.tri)
convex.hull(quakes.tri, plot.it=TRUE, add=TRUE, col="red")
# }
Documentation reproduced from package interp, version 1.0-33, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.