# Geodesic Bending Invariants with Landmarks¶


This tour explores the use of farthest point sampling to compute bending invariant with classical MDS (strain minimization).

In [2]:
addpath('toolbox_signal')


## Farthest Points Landmarks Seeding¶

For large mesh, computing all the pairwise distances is intractable. It is possible to speed up the computation by restricting the computation to a small subset of landmarks.

This seeding strategy was used for surface remeshing in:

Geodesic Remeshing Using Front Propagation, Gabriel Peyr and Laurent Cohen, International Journal on Computer Vision, Vol. 69(1), p.145-156, Aug. 2006.

In [3]:
name = 'elephant-50kv';
options.name = name;
nverts = size(vertex,2);


Display it.

In [4]:
clf;
plot_mesh(vertex,faces, options);


Compute a sparse set of landmarks to speed up the geodesic computations. The landmarks are computed using farthest point sampling.

First landmarks, at random.

In [5]:
landmarks = 23057;
Dland = [];


Perform Fast Marching to compute the geodesic distance, and record it.

In [6]:
[Dland(:,end+1),S,Q] = perform_fast_marching_mesh(vertex, faces, landmarks(end));


Select farthest point. Here, |min(Dland,[],2)| is the distance to the set of seed points.

In [7]:
[tmp,landmarks(end+1)] = max( min(Dland,[],2) );


Update distance function.

In [8]:
[Dland(:,end+1),S,Q] = perform_fast_marching_mesh(vertex, faces, landmarks(end));


Display distances.

In [9]:
clf;
options.start_points = landmarks;
plot_fast_marching_mesh(vertex,faces, min(Dland,[],2) , [], options);


Exercise 1

Compute a set of |n = 300| vertex by iterating this farthest point sampling. Display the progression of the sampling.

In [10]:
exo1()