edge_angles_vis2d: 2D visualizer for edgeAngles output

View source: R/edgeAngles_visualize.R

edge_angles_vis2dR Documentation

2D visualizer for edgeAngles output

Description

[Experimental]

Generates figures from the output of the edgeAngles() function.

Usage

edge_angles_vis2d(ea_output, mesh, ncol = 2, nrow = 2)

Arguments

ea_output

A list corresponding to the unmodified output of edgeAngles().

mesh

An mesh3d object corresponding to the mesh on which the angles were measured.

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.

Details

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.

Value

A list of figures containing sub-plots for each angle measurement

Author(s)

Cornel M. Pop

See Also

edge_angles_vis3d - visualize the edge angle measurements in 3D.

Examples

## 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)

cornelmpop/Lithics3D documentation built on Feb. 10, 2024, 11:54 p.m.