Learn R Programming

rollply (version 0.5.0)

build_grid_ahull_crop: Regular grid in alpha-hull

Description

Create a grid within the alpha hull of a set of points.

Usage

build_grid_ahull_crop(coords, npts, pad = NULL, grid_opts = list(alpha = 0.3, scale_alpha = TRUE))

Arguments

coords
A matrix or data.frame of coordinates with two columns
npts
The number of points before cropping to the alpha hull shape
pad
Ignored
grid_opts
A list with component alpha that controls the shape of the alpha hull (see details).

Value

The coordinates of a grid of points as a data.frame with ncol(coords) columns. Names are transfered from the coords data frame.

Details

This function creates a rectangular grid over a set of points, then computes the alpha hull of the set of points, and discards all the points of the new grid that fall outside of the hull.

This function computes the alpha hull of a set of points which is an estimate of its overall outline. The intricateness of this outline is determined by the alpha parameter: a value close to zero will produce a very intricate outline and a high value will produce a coarse outline (similar to the convex hull). It is highly recommended to try different values of alpha to see what is most appropriate for one's datasets.

See Also

ahull

Other grid.building.functions: build_grid_ahull_fill, build_grid_identical, build_grid_squaretile