edge_angles_vis3d: 3D visualizer for edgeAngles output

View source: R/edgeAngles_visualize.R

edge_angles_vis3dR Documentation

3D visualizer for edgeAngles output

Description

[Experimental]

Shows where edge angles were measured in a previous run of the edgeAngles() function. The following elements are always displayed:

  1. Blue lines: Edge angles at each edge sampling point.

  2. Black lines: Distances between the endpoints of the blue lines at each sampling point.

  3. Numbers: Sequential IDs of the measurements, corresponding to the numeric index in the edgeAngles output. See the documentation for the edgeAngles() function for more details.

The following optional elements may also be displayed:

  1. Purple points: Points that define the edge curve (see the show_pois parameter).

  2. Green semi-transparent mesh: The mesh on which the angles were computed (see the show_mesh parameter).

Usage

edge_angles_vis3d(ea_output, show_mesh = NULL, show_pois = NULL)

Arguments

ea_output

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

show_mesh

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

show_pois

An optional data.frame corresponding to the c.lms argument passed to the edgeAngles function when the angles were measured.

Details

Loops through the output of edgeAngles() plotting key parameters for each angle measurement in a new RGL window.

Value

The ID of the RGL window where the results were plotted.

Author(s)

Cornel M. Pop

See Also

edge_angles_vis2d - generate figures with 2D plots of the edge angle measurements.

Examples

## Not run: 
library(rgl)

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

# Visualize what was measured, and where:
window_id <- edge_angles_vis3d(res,
                               show_mesh = demoFlake2$mesh,
                               show_pois = path.res)

# Close the window:
close3d(window_id)

## End(Not run)

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