Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ray2mesh

projects the vertices of a mesh along its normals onto the surface of another one.


Description

projects the vertices of a mesh onto the surface of another one by searching for the closest point along vertex normals on the target by for each vertex.

Usage

ray2mesh(mesh1, tarmesh, tol = 1e+12, inbound = FALSE,
  mindist = FALSE, ...)

Arguments

mesh1

mesh to project. Can be an object of class "mesh3d" or path to an external mesh file (ply, obj, stl).

tarmesh

mesh to project onto. Can be an object of class "mesh3d" or path to an external mesh file (ply, obj, stl).

tol

numeric: maximum distance to search along ray, closest Euclidean distance will be used, if tol is exceeded.

inbound

inverse search direction along rays.

mindist

search both ways (ray and -ray) and select closest point.

...

additional arguments not used at the moment.

Value

returns projected mesh with additional list entries:

quality

integer vector containing a value for each vertex of x: 1 indicates that a ray has intersected 'tarmesh' within the given threshold, while 0 means not

distance

numeric vector: distances to intersection

Author(s)

Stefan Schlager

See Also


Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.