Last data update: 2014.03.03

R: Produce matrix of triangle vertex indices.
triMatR Documentation

Produce matrix of triangle vertex indices.

Description

Lists the indices of the vertices of each Delaunay triangle in the triangulation of a planar point set. The indices are listed (in increasing numeric order) as the rows of an n x 3 matrix where n is the number of Delaunay triangles in the triangulation.

Usage

triMat(object)

Arguments

object

An object of class deldir (as produced by the funtion deldir()) specifying the Delaunay triangulation and Dirichlet (Voronoi) tesselation of a planar point set.

Details

This function was suggested by Robin Hankin of the School of Mathematical and Computing Sciences at Auckland University of Technology.

Value

An n x 3 matrix where n is the number of Delaunay triangles in the triangulation specified by object. The i-th row consists of the indices (in the original list of points being triangulated) of vertices of the i-th Delaunay triangle. The indices are listed in increasing numeric order in each row.

Author(s)

Rolf Turner r.turner@auckland.ac.nz

See Also

deldir() triang.list() plot.triang.list()

Examples

set.seed(42)
x    <- runif(10)
y    <- runif(10)
ddxy <- deldir(x,y)
M    <- triMat(ddxy)

Results