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
tears
Matrix 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
phi0
rim angle in radians
lambda0
longitude of fixed point
i0
index 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)
pids
the 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)
pid
ID of point
ID of tear
getTear()
Return indices of tear in AnnotatedOutline
AnnotatedOutline$getTear(tid)
tid
Tear 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)
tears
Matrix containing columns V0
(Apices of tears)
VB
(Backward vertices of tears) and VF
(Forward
vertices of tears)
List containing
Rset
the set of points on the rim
TFset
list containing indices of points in each forward tear
TBset
list containing indices of points in each backward tear
h
correspondence mapping
hf
correspondence mapping in forward direction for
points on boundary
hb
correspondence mapping in backward direction for
points on boundary
addTear()
Add tear to an AnnotatedOutline
AnnotatedOutline$addTear(pids)
pids
Vector of three point IDs to be added
removeTear()
Remove tear from an AnnotatedOutline
AnnotatedOutline$removeTear(tid)
tid
Tear 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)
i0
Index of fixed point
name
Name 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)
deep
Whether 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