Description Usage Arguments Details Value Author(s) See Also
Calculates the Voronoi (nearest-neighbor) segmentation of a two-dimensional rectangular region based on a set of points.
1 |
pts |
a two column array of points around which to calculate Voronoi cells |
bbox |
the rectangular bounding box the Voronoi cells must fill, represented by a length
4 vector of the form |
Though this function is not strictly necessary to the use of other functions in this package, we found the construction of a Voronoi segmentation to be a rather tedious task, and felt that making the function available to those who want a simple segmentation function was a reasonable choice.
A data frame intended for use in the ggplot2
function geom_polygon
. The data
frame describes one polygon for each given input point, with the 'x' and 'y' columns specifying the
x- and y-coordinates of the vertices of the polygon, and the column 'poly' specifying the index of
the point (in the input array pts
) around which the polygon sits.
Nathaniel R. Twarog
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.