An AnnotatedOutline contains a function to annotate tears on the outline.
AnnotatedOutline object, with extra fields for tears
latitude of rim phi0 and index of fixed point i0.
retistruct::OutlineCommon -> retistruct::Outline -> retistruct::PathOutline -> AnnotatedOutline
tearsMatrix in which each row represents a tear by the
indices into the outline points of the apex (V0) and
backward (VB) and forward (VF) points
phi0rim angle in radians
lambda0longitude of fixed point
i0index of fixed point
new()Constructor
AnnotatedOutline$new(...)
...Parameters to PathOutline
labelTearPoints()Label a set of three unlabelled points supposed
to refer to the apex and vertices of a cut and tear with the V0
(Apex), VF (forward vertex) and VB (backward vertex) labels.
AnnotatedOutline$labelTearPoints(pids)
pidsthe vector of three indices
Vector of indices labelled with V0, VF and VB
whichTear()Return index of tear in an AnnotatedOutline in which a point appears
AnnotatedOutline$whichTear(pid)
pidID of point
ID of tear
getTear()Return indices of tear in AnnotatedOutline
AnnotatedOutline$getTear(tid)
tidTear ID, which can be returned from whichTear()
Vector of three point IDs, labelled with V0,
VF and VB
getTears()Get tears
AnnotatedOutline$getTears()
Matrix of tears
computeTearRelationships()Compute the parent relationships for a potential set of tears. The function throws an error if tears overlap.
AnnotatedOutline$computeTearRelationships(tears = NULL)
tearsMatrix containing columns V0 (Apices of tears)
VB (Backward vertices of tears) and VF (Forward
vertices of tears)
List containing
Rsetthe set of points on the rim
TFsetlist containing indices of points in each forward tear
TBsetlist containing indices of points in each backward tear
hcorrespondence mapping
hfcorrespondence mapping in forward direction for
points on boundary
hbcorrespondence mapping in backward direction for
points on boundary
addTear()Add tear to an AnnotatedOutline
AnnotatedOutline$addTear(pids)
pidsVector of three point IDs to be added
removeTear()Remove tear from an AnnotatedOutline
AnnotatedOutline$removeTear(tid)
tidTear ID, which can be returned from whichTear()
checkTears()Check that all tears are correct.
AnnotatedOutline$checkTears()
If all is OK, returns empty vector. If not, returns indices of problematic tears.
setFixedPoint()Set fixed point
AnnotatedOutline$setFixedPoint(i0, name)
i0Index of fixed point
nameName of fixed point
getFixedPoint()Get point ID of fixed point
AnnotatedOutline$getFixedPoint()
Point ID of fixed point
getRimSet()Get point IDs of points on rim
AnnotatedOutline$getRimSet()
Point IDs of points on rim
ensureFixedPointInRim()Ensure that the fixed point i0 is in the rim, not a tear.
Alters object in which i0 may have been changed.
AnnotatedOutline$ensureFixedPointInRim()
getRimLengths()Get lengths of edges on rim
AnnotatedOutline$getRimLengths()
Vector of rim lengths
clone()The objects of this class are cloneable with this method.
AnnotatedOutline$clone(deep = FALSE)
deepWhether to make a deep clone.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab