vcgGeodist: Compute pseudo-geodesic distance between two points on a mesh

View source: R/vcgDijkstra.r

vcgGeodistR Documentation

Compute pseudo-geodesic distance between two points on a mesh

Description

Compute pseudo-geodesic distance between two points on a mesh

Usage

vcgGeodist(x, pt1, pt2)

Arguments

x

triangular mesh of class mesh3d

pt1

3D coordinate on mesh or index of vertex

pt2

3D coordinate on mesh or index of vertex

Value

returns the geodesic distance between pt1 and pt2.

Note

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 closest to these points.

Examples

data(humface)
pt1 <- humface.lm[1,]
pt2 <- humface.lm[5,]
vcgGeodist(humface,pt1,pt2)

Rvcg documentation built on Sept. 30, 2024, 9:39 a.m.