geodesic_distance#
- PolyData.geodesic_distance(start_vertex, end_vertex, progress_bar=False)#
Calculate the geodesic distance between two vertices using Dijkstra’s algorithm.
- Parameters
- Returns
float
Length of the geodesic segment.
Examples
>>> import pyvista as pv >>> sphere = pv.Sphere() >>> length = sphere.geodesic_distance(0, 100) >>> f'Length is {length:.3f}' 'Length is 0.812'
See Geodesic Paths for more examples using this filter.