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

triang.list

Create a list of Delaunay triangles


Description

From an object of class “deldir” produces a list of the Delaunay triangles in the triangulation of a set of points in the plane.

Usage

triang.list(object)

Arguments

object

An object of class “deldir” as produced by deldir().

Value

A list each of whose components is a 3 x 3, 3 x 4 or 3 x 5 data frame corresponding to one of the Delaunay triangles specified by “object”. The rows of each such data frame correspond to the vertices of the corresponding Delaunay triangle. The columns are:

  • ptNum (the index of the point in the original sequence of points that is being triangulated. Note that if a point is one of a set of duplicated points then ptNum is the first of the indices of the points in this set.)

  • ptType (the type of the vertex; “data” or “dummy”; present only if there were any dummy points specified)

  • x (the x-coordinate of the vertex)

  • y (the x-coordinate of the vertex)

  • z (the “auxiliary value” or “weight” z associated with the vertex; present only if such values were supplied in the call to deldir())

The returned value has an attribute “rw” consisting of the enclosing rectangle of the triangulation.

Note

The code of this function was taken more-or-less directly from code written by Adrian Baddeley for the “delaunay()” function in the “spatstat” package.

Author(s)

See Also

Examples

set.seed(42)
x   <- runif(20)
y   <- runif(20)
z   <- sample(1:100,20)
d   <- deldir(x,y,z=z)
ttt <- triang.list(d)

deldir

Delaunay Triangulation and Dirichlet (Voronoi) Tessellation

v0.2-10
GPL (>= 2)
Authors
Rolf Turner
Initial release
2021-02-16

We don't support your browser anymore

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