meshmetrics | R Documentation |
Calculates a number of geometric attributes for a given Delaunay triangulation based on the circumscribed and inscribed circle of each triangle.
meshmetrics(mesh)
mesh |
A |
A triangle's circumcircle (circumscribed circle) is the unique circle that passes through each of its three vertices. A triangle's incircle (inscribed circle) is the largest circle that can be contained within it (i.e., touches it's three edges).
An object of class sf
with the following data for each triangle in the
triangulation
V1
, V2
, and V3
corresponding vertices
of mesh
matches mesh$graph$tv
;
ID
, numeric triangle id;
angleA
, angleB
, and angleC
, the
interior angles;
circumcircle radius, circumradius, circumcircle_R
(R
);
incircle radius incircle_r
(r
);
centroid locations of the circumcircle, circumcenter, (c_Ox, c_Oy
);
centroid locations of the incircle, incenter, (i_Ox, i_Oy
);
the radius-edge ratio radius_edge
\frac{R}{l_{min}}
,
where l_{min}
is the minimum edge length;
the radius ratio radius_ratio
\frac{r}{R}
;
area
, area (A
);
quality
a measure of "quality" defined as
\frac{4\sqrt{3}|A|}{\Sigma_{i = 1}^3 L_i^2}
,
where L_i
is the length of edge i
.
data(horse_mesh, package = "stelfi")
metrics <- meshmetrics(horse_mesh)
if(require("ggplot2")) {
ggplot(metrics) + geom_sf(aes(fill = radius_ratio))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.