vcgDijkstra | R Documentation |
Compute pseudo-geodesic distances on a triangular mesh
vcgDijkstra(x, vertpointer, maxdist = NULL)
x |
triangular mesh of class |
vertpointer |
integer: references indices of vertices on the mesh, typically only a single query vertex. |
maxdist |
positive scalar double, the maximal distance to travel along the mesh when computing distances. Leave at |
returns a vector of shortest distances for each of the vertices to one of the vertices referenced in vertpointer
. If maxdis
t is in use (not NULL
), the distance values for vertices outside the requested maxdist
are not computed and appear as 0
.
Make sure to have a clean manifold mesh. Note that this computes the length of the pseudo-geodesic path (following the edges) between the two vertices.
## Compute geodesic distance between all mesh vertices and the first vertex of a mesh data(humface) geo <- vcgDijkstra(humface,1) if (interactive()) { require(Morpho);require(rgl) meshDist(humface,distvec = geo) spheres3d(vert2points(humface)[1,],col=2) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.