Last chance! 50% off unlimited learning
Sale ends in
convexhull.xy(x, y=NULL)
x
coordinates of observed points,
or a 2-column matrix giving x,y
coordinates,
or a list with components x,y
giving coordinates
(such as a point pattern object of class "ppp"
.)y
coordinates of observed points,
if x
is a vector."owin"
).x
and y
, this function computes
the convex hull of the points, and returns it as a window.owin
,
as.owin
,
bounding.box.xy
,
ripras
x <- runif(30)
y <- runif(30)
w <- convexhull.xy(x,y)
plot(owin(), main="convexhull.xy(x,y)", lty=2)
plot(w, add=TRUE)
points(x,y)
X <- rpoispp(30)
plot(X, main="convexhull.xy(X)")
plot(convexhull.xy(X), add=TRUE)
Run the code above in your browser using DataLab