vol_faceweighted: Compute volume departures from reference plane

Description Usage Arguments Details Value Examples

View source: R/mesh-volume-fns.R

Description

Computes area of each face and average distance of its 3 vertices. Multiplies these values to yield a weighted "approximate volume" for each face. Sums the values based on whether the mean distance is above or below the reference # datum.

Usage

1
vol_faceweighted(mesh, radius = 7)

Arguments

mesh

Object of class "mesh3d"

radius

Radius in cm that the mesh was trimmed, see pre_process_mesh() and remove_cyl()

Details

\lifecycle

experimental

Value

List of length 3; each element is a numeric vector of length 1 containing the computed volume above or below the reference datum, or the sum of these two (absolute value, i.e. total displacement)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(magrittr)
library(soilmesh)
library(mesheR)

trimmed <- remove_cyl(untrimmed_mesh1) %>%
  adjust_xy() %>%
  adjust_z()


rgl::clear3d()
mesheR::wiremesh3d(trimmed)
add_origin_axes()
mesheR::wiremesh3d(ref_circ)

vols <- vol_faceweighted(trimmed, radius = 7)

evanmascitti/soilmesh documentation built on Sept. 30, 2021, 7:57 a.m.