dne: Dirichlet normal energy

View source: R/topography.R

dneR Documentation

Dirichlet normal energy

Description

Compute the Dirichlet normal energy.

Usage

dne(mesh, range = 0.999, total = FALSE)

Arguments

mesh

object of class mesh3d

range

an integer between 0 and 1 indicating the percentage of values to consider for the computation. Following Pampush et al. (2016) default is set to 0.999.

total

logical, should the result of the function be the total DNE.

Details

The current algorithm gives a different estimate of DNE when compared with the values obtained using the molaR package. Albeit small, this difference likely comes from different methods of border selection. The doolkit package uses the function dkborder, which accurately selects every polygon sharing a vertex (or more) with the border.

Value

If total = FALSE, a numeric vector of dne values for all the polygons of the mesh. If total = TRUE, a single DNE value, calculated as the sum of the products of polygon normal energies * polygon areas.

References

doi: 10.1002/ajpa.21489Bunn et al. (2011)

doi: 10.1007/s10914-016-9326-0Pampush et al. (2016)

See Also

DNE

dkborder

Examples

dne <- dne(dkmodel$complex)
summary(dkmodel$complex)

#total DNE value corresponds to the sum of products Dne * Area:
round(sum(dne*Rvcg::vcgArea(dkmodel$complex, perface = TRUE)$pertriangle), 3)
#can be directly computed using \code{dne}:
dne(dkmodel$complex, total = TRUE)

#render on a map:
dkmap(dkmodel$complex, dne, legend.type = "log", col = "dne")

doolkit documentation built on Feb. 16, 2023, 11 p.m.