TriangulatedOutline: Class containing functions and data relating to Triangulation

Description Super classes Public fields Methods Author(s) Examples

Description

A TriangulatedOutline contains a function to create a triangulated mesh over an outline, and fields to hold the mesh information. Note that areas and lengths are all scaled using the value of the scale field.

Super classes

retistruct::OutlineCommon -> retistruct::Outline -> retistruct::PathOutline -> retistruct::AnnotatedOutline -> TriangulatedOutline

Public fields

T

3 column matrix in which each row contains IDs of points of each triangle

A

Area of each triangle in the mesh - has same number of elements as there are rows of T

A.tot

Total area of the mesh

Cu

2 column matrix in which each row contains IDs of

L

Length of each edge in the mesh - has same number of elements as there are rows of Cu

Methods

Public methods

Inherited methods

Method triangulate()

Triangulate (mesh) outline

Usage
TriangulatedOutline$triangulate(n = 200, suppress.external.steiner = FALSE)
Arguments
n

Desired number of points in mesh

suppress.external.steiner

Boolean variable describing whether to insert external Steiner points - see TriangulatedFragment


Method mapTriangulatedFragment()

Map the point IDs of a TriangulatedFragment on the point IDs of this Outline

Usage
TriangulatedOutline$mapTriangulatedFragment(fragment, pids)
Arguments
fragment

TriangulatedFragment to map

pids

Point IDs in TriangulatedOutline of points in TriangulatedFragment


Method clone()

The objects of this class are cloneable with this method.

Usage
TriangulatedOutline$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

David Sterratt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
P <- rbind(c(1,1),   c(2,1),  c(2,-1),
           c(1,-1),  c(1,-2), c(-1,-2),
           c(-1,-1), c(-2,-1),c(-2,1),
           c(-1,1),  c(-1,2), c(1,2))
o <- TriangulatedOutline$new(P)
o$addTear(c(3, 4, 5))
o$addTear(c(6, 7, 8))
o$addTear(c(9, 10, 11))
o$addTear(c(12, 1, 2))
flatplot(o)

retistruct documentation built on April 4, 2020, 5:08 p.m.