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

convexhull.xy

Convex Hull of Points


Description

Computes the convex hull of a set of points in two dimensions.

Usage

convexhull.xy(x, y=NULL)

Arguments

x

vector of 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

(optional) vector of y coordinates of observed points, if x is a vector.

Details

Given an observed pattern of points with coordinates given by x and y, this function computes the convex hull of the points, and returns it as a window.

Value

A window (an object of class "owin").

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

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 <- runifrect(30)
  plot(X, main="convexhull.xy(X)")
  plot(convexhull.xy(X), add=TRUE)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

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