Learn R Programming

Morpho (version 1.0-1)

projRead: Project points onto the closest point on a mesh

Description

project points onto a given surface and return projected points and normals.

Usage

projRead(lm, mesh, readnormals = TRUE, clean = TRUE, smooth = TRUE,
ignore.stdout = FALSE, sign = FALSE, lmdump=NULL, prodump=NULL)

Arguments

lm
m x 3 matrix containing 3D coordinates.
mesh
character: specify path to mesh file.
readnormals
logical: return normals of projected points.
clean
logical: remove dumpfiles.
smooth
logical: rerturn smoothed normals.
ignore.stdout
logical: supress console messages from system calls.
sign
logical: request signed distances.
prodump
character: name of the dumpfile storing the projected points' coordinates (useful when using parallel backend).
lmdump
character: name of the dumpfile storing data to be projected (useful when using parallel backend).

Value

  • if readnormals = FALSE, a m x 3 matrix containing projected points is returned, otherwise a list, where
  • vb3 x m matrix containing projected points
  • normals3 x m matrix containing normals

References

Detection of inside/outside uses the algorithm proposed in:

Baerentzen, Jakob Andreas. & Aanaes, H., 2002. Generating Signed Distance Fields From Triangle Meshes. Informatics and Mathematical Modelling.

See Also

closemeshKD

Examples

Run this code
data(nose)
repro <- projRead(shortnose.lm,shortnose.mesh)

Run the code above in your browser using DataLab