vcgGeodesicPath | R Documentation |
Compute geodesic path and path length between vertices on a mesh
vcgGeodesicPath(x, source, targets, maxdist = 1e+06)
x |
triangular mesh of class |
source |
scalar positive integer, the source vertex index. |
targets |
positive integer vector, the target vertex indices. |
maxdist |
numeric, the maximal distance to travel along the mesh edges during geodesic distance computation. |
named list with two entries as follows. 'paths'
: list of integer vectors, representing the paths. 'geodist'
: double vector, the geodesic distances from the source vertex to all vertices in the graph.
Currently no reachability checks are performed, so you have to be sure that the mesh is connected, or at least that the source and target vertices are reachable from one another.
data(humface)
p = vcgGeodesicPath(humface,50,c(500,5000))
p$paths[[1]]; # The path 50..500
p$geodist[500]; # Its path length.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.