chull(x, y=NULL)
x, y
|
coordinate vectors of points. This can be specified as two
vectors x and y , a 2-column matrix x , a list
x with components x and y
|
xy.coords
is used to intepret the specification of the
points. The algorithm is that given by Eddy (1977).
`Peeling' as used in the S function chull
can be implemented
by calling chull
recursively.
Eddy, W. F. (1977) Algorithm 523. CONVEX, A new convex hull algorithm for planar sets[Z].ACM Transactions on Mathematical Software, 3, 411-412.
xy.coords
,polygon
X <- matrix(rnorm(2000), ncol=2) plot(X, type="n") points(X, cex=0.5) hpts <- chull(X) hpts <- c(hpts, hpts[1]) lines(X[hpts, ])