pyFM.mesh.geometry.heat_geodesic_from

pyFM.mesh.geometry.heat_geodesic_from(inds, vertices, faces, normals, A, W=None, t=0.001, face_areas=None, vert_areas=None, grads=None, solver_heat=None, solver_lap=None)

Compute geodesic distances between vertices of index inds and all other vertices using the Heat Method.

Parameters:
  • inds (int or (p,) np.ndarray) – Index of the source vertex (or vertices).

  • vertices ((n, 3) np.ndarray) – Coordinates of the vertices.

  • faces ((m, 3) np.ndarray) – Triangular faces defined by 3 vertex indices.

  • normals ((m, 3) np.ndarray) – Per-face normals.

  • A ((n, n) scipy.sparse) – Area matrix of the mesh, so that the Laplacian L = A^-1 W.

  • W ((n, n) scipy.sparse, optional) – Stiffness matrix, so that the Laplacian L = A^-1 W. Optional if solvers are given.

  • t (float, optional) – Time parameter for which to solve the heat equation.

  • face_areas ((m,) np.ndarray, optional) – Per-face areas, for faster computation.

  • vert_areas ((n,) np.ndarray, optional) – Per-vertex areas, for faster computation.

  • grads (list, optional) – List of size 3, each giving per-face gradient directions (output of _get_grad_dir()).

  • solver_heat (callable, optional) – Solver for (A + tW) x = b given b.

  • solver_lap (callable, optional) – Solver for W x = b given b.

Returns:

geod_dist – Geodesic distance for each vertex in inds.

Return type:

(n,) or (n, p) np.ndarray