Learn R Programming

Rvcg (version 0.24)

vcgGeodesicPath: Compute geodesic path and path length between vertices on a mesh

Description

Compute geodesic path and path length between vertices on a mesh

Usage

vcgGeodesicPath(x, source, targets, maxdist = 1e+06)

Value

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.

Arguments

x

triangular mesh of class mesh3d from the rgl package.

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.

Examples

Run this code
data(humface)
p = vcgGeodesicPath(humface,50,c(500,5000))
p$paths[[1]];   # The path 50..500
p$geodist[500]; # Its path length.

Run the code above in your browser using DataLab