pyFM.mesh.geometry.farthest_point_sampling_call

pyFM.mesh.geometry.farthest_point_sampling_call(d_func, k, n_points=None, verbose=False)

Sample points using farthest point sampling, initialized randomly.

Parameters:
  • d_func (callable) – For index i, d_func(i) is a (n_points,) array of geodesic distances to other points.

  • k (int) – Number of points to sample.

  • n_points (int, optional) – Number of points. If not specified, checks d_func(0).

  • verbose (bool, optional) – Whether to display a progress bar.

Returns:

fps – Array of indices of sampled points.

Return type:

(k,) np.ndarray