View source: R/edgeAngles_visualize.R
edge_angles_vis2d | R Documentation |
Generates figures from the output of the edgeAngles()
function.
edge_angles_vis2d(ea_output, mesh, ncol = 2, nrow = 2)
ea_output |
A list corresponding to the unmodified output of
|
mesh |
An |
ncol |
A number indicating the number of sub-plots to fit horizontally in each output figure. |
nrow |
A number indicating the number of sub-plots to fit vertically in each output figure. |
The output figures include one or more sub-plots, each of which shows a slice of the mesh and the lines (with endpoints) used to measure the edge angles on that slice. Note that:
The mesh slices are perpendicular to the object edge, and on the
plane (P)
on which the angles were measured (see edgeAngles()
for more
details).
The black dots that define the mesh slice outlines
represent the endpoints of the triangle sides (i.e., mesh edges)
intersected by the measurement plane (P
); in other words, they do not
indicate exact intersection points between the triangle sides and the
measurement plane - they are an approximation.
Data in each sub-plot has been rotated so that they align with the x and y axes, with the origin (i.e., x = 0, y = 0) set to the object's edge sampling point.
Axis values are given in mesh units.
Each sub-plot is labelled with the index of the respective angle
measurement in the ea_output
list.
With each output figure all sub-plots are drawn to the same scale and with a 1:1 ratio, but the scale may vary across figures.
The number of sub-plots per figure is determined from the ncol
and nrow
parameters. If individual figures for each sub-plot are needed, simply set
both ncol
and nrow
to 1.
A list of figures containing sub-plots for each angle measurement
Cornel M. Pop
edge_angles_vis3d - visualize the edge angle measurements in 3D.
## Not run:
# Compute edge angles using included demo data:
data(demoFlake2)
e.curve = sPathConnect(demoFlake2$lms[1:4, ],
demoFlake2$mesh, path.choice = "ridges")
mv <- t(demoFlake2$mesh$vb)
path.res <- pathResample(mv[e.curve,1:3], 30, method = "npts")
res = edgeAngles(demoFlake2$mesh, path.res, m.d = 3)
# Generate figures:
angle_plots <- edge_angles_vis2d(res,
mesh = demoFlake2$mesh,
ncol = 3)
# See the first figure:
angle_plots[[1]]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.