Description Usage Arguments Value Note Author(s) References See Also Examples

For a set of 3D-coordinates/triangular mesh, the closest matches on a target surface are determined and normals at as well as distances to that point are calculated.

1 2 3 |

`x` |
k x 3 matrix containing 3D-coordinates or object of class "mesh3d". |

`mesh` |
triangular surface mesh stored as object of class "mesh3d". |

`sign` |
logical: if TRUE, signed distances are returned. |

`barycentric` |
logical: if TRUE, barycentric coordinates of the hit points are returned. |

`smoothNormals` |
logical: if TRUE, laplacian smoothed normals are used. |

`borderchk` |
logical: request checking if the hit face is at the border of the mesh. |

`tol` |
maximum distance to search. If distance is beyond that, the original point will be kept and the distance set to NaN. If tol = 0, tol is set to 2*diagonal of the bounding box of |

`facenormals` |
logical: if TRUE only the facenormal of the face the closest point has hit is returned, the weighted average of the surrounding vertex normals otherwise. |

`...` |
additional parameters, currently unused. |

returns an object of class "mesh3d" with:

`vb ` |
4 x n matrix containing n vertices as homolougous coordinates. |

`normals ` |
4 x n matrix containing vertex normals. |

`quality ` |
numeric vector containing distances to target. |

`it ` |
3 x m integer matrix containing vertex indices forming triangular faces.Only available, when x is a mesh. |

`border ` |
integer vector of length n: if borderchk = TRUE, for each clostest point the value will be 1 if the hit face is at the border of the target mesh and 0 otherwise. |

`barycoords ` |
3 x m Matrix containing barycentric coordinates of closest points; only available if barycentric=TRUE. |

`faceptr ` |
vector of face indeces on which the closest points are located |

If large part of the reference mesh are far away from the target
surface, calculation can become very slow. In that case, the function
`vcgClostKD`

will be significantly faster.

Stefan Schlager

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

1 2 | ```
data(humface)
clost <- vcgClost(humface.lm, humface)
``` |

zarquon42b/Rvcg documentation built on Jan. 17, 2019, 9:10 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.