interp (version 1.0-33)

voronoi.mosaic: Voronoi mosaic

Description

This function creates a Voronoi mosaic out of a given set of arbitraryly located points in the plane. Each cell of a voronoi mosaic is associated with a data point and contains all points \((x,y)\) closest to this data point.

Usage

voronoi.mosaic(x, y = NULL, duplicate = "error")

Arguments

x

vector containing \(x\) coordinates of the data. If y is missing x should be a list or dataframe with two components x and y.

x can also be an object of class triSht generated by tri.mesh. In this case the internal triangulation step can be skipped.

y

vector containing \(y\) coordinates of the data. Can be omitted if x is a list with two components x and y.

duplicate

flag indicating how to handle duplicate elements. Possible values are:

  • "error" -- default,

  • "strip" -- remove all duplicate points,

  • "remove" -- leave one point of the duplicate points.

Value

An object of class voronoi.

Details

The function creates first a Delaunay triangulation (if not already given), extracts the circumcircle centers of these triangles, and then connects these points according to the neighbourhood relations between the triangles.

References

G. Voronoi, Nouvelles applications des parametres continus a la theorie des formes quadratiques. Deuxieme memoire. Recherches sur les parallelloedres primitifs, Journal fuer die reine und angewandte Mathematik, 1908, vol 134, p. 198-287

See Also

voronoi,voronoi.mosaic, print.voronoi, plot.voronoi

Examples

Run this code
# NOT RUN {
data(franke)
fd <- franke$ds3
vr <- voronoi.mosaic(fd$x, fd$y)
summary(vr)
# }

Run the code above in your browser using DataLab