from
Exact geodesic for triangular meshes
by Danil Kirsanov
Geodesic (shortest path) algorithm for triangular mesh (triangulated 2D surface in 3D).
|
| geodesic_propagate(algorithm, source_points, stop_points, max_distance)
|
function geodesic_propagate(algorithm, source_points, stop_points, max_distance)
global geodesic_library;
if nargin < 4
max_distance = 1e100;
end
if nargin < 3
stop_points = [];
end
if ~libisloaded(geodesic_library)
disp('error: geodesic library is not loaded');
return;
end
sources = geodesic_convert_surface_points(source_points);
stops = geodesic_convert_surface_points(stop_points);
calllib(geodesic_library, 'propagate', algorithm.id, ...
sources, length(sources)/5, stops, length(stops)/5, max_distance);
|
|
Contact us at files@mathworks.com