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

triangles

Extract a list of triangles from a triangulation object


Description

This function extracts a list of triangles from an triangulation object created by tri.mesh.

Usage

triangles(tri.obj)

Arguments

tri.obj

object of class triSht

Details

The vertices in the returned matrix (let's denote it with retval) are ordered counterclockwise. The columns trx and arcx, x=1,2,3 index the triangle and arc, respectively, which are opposite (not shared by) node nodex, with trix=0 if arcx indexes a boundary arc. Vertex indexes range from 1 to n, the number of nodes, triangle indexes from 0 to nt, and arc indexes from 1 to na = nt+n-1.

Value

A matrix with columns node1, node2, node3, representing the vertex nodal indexes, tr1, tr2, tr3, representing neighboring triangle indexes and arc1, arc2, arc3 reresenting arc indexes.

Each row represents one triangle.

Author(s)

Albrecht Gebhardt <albrecht.gebhardt@aau.at>, Roger Bivand <roger.bivand@nhh.no>

See Also

Examples

# use the smallest Franke data set
data(franke)
fr3.tr<-tri.mesh(franke$ds3$x, franke$ds3$y)
triangles(fr3.tr)

interp

Interpolation Methods

v1.0-33
GPL (>= 2)
Authors
Albrecht Gebhardt [aut, cre, cph] (...), Roger Bivand [aut], David Sinclair [aut, cph]
Initial release
2020-01-07

We don't support your browser anymore

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