mesh_area | R Documentation |
Calculates the surface area of an arbitrary triangular mesh by adding up the areas of individual constituent triangles. Please ensure that the mesh is clean (e.g. no non-manifold vertices, etc)
mesh_area(mesh, par_exec = FALSE, max_cores = NA)
mesh |
a clean mesh3d object for which area will be computed |
par_exec |
boolean indicating whether par_exec processing is to be used. Set to FALSE by default |
max_cores |
maximum number of cores to use if parallel processing is requested. Requesting more cores than are physically available will simply result in all cores being used. |
Numeric value of the computed area or NA in case of bad input.
For small meshes it may be faster to use a single thread due to the overhead associated with starting the processing cluster.
data(demoSurface)
# Non-parallel execution:
mesh_area(demoSurface)
# Parallel execution with a maximum of 2 cores.
mesh_area(demoSurface, par_exec = TRUE, max_cores = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.