pyFM.spectral.shape_difference

Functions

area_SD(FM)

Return the area shape difference computed from a functional map.

compute_SD(mesh1, mesh2[, k1, k2, p2p, SD_type])

Computes shape difference operators from a vertex to vertex map.

conformal_SD(FM, evals1, evals2)

Return the conformal shape difference operator computed from a functional map.

pyFM.spectral.shape_difference.area_SD(FM)

Return the area shape difference computed from a functional map.

Parameters:

FM – (k2,k1) functional map between two meshes

Returns:

SD – k1,k1) - Area based shape difference operator

Return type:

np.ndarray

pyFM.spectral.shape_difference.conformal_SD(FM, evals1, evals2)

Return the conformal shape difference operator computed from a functional map.

Parameters:
  • FM – (k2,k1) functional map between two meshes

  • evals1 – eigenvalues of the LBO on the source mesh (at least k1)

  • evals2 – eigenvalues of the LBO on the target mesh (at least k2)

Returns:

SD – (k1,k1) - Conformal shape difference operator

Return type:

np.ndarray

pyFM.spectral.shape_difference.compute_SD(mesh1, mesh2, k1=None, k2=None, p2p=None, SD_type='spectral')

Computes shape difference operators from a vertex to vertex map.

Parameters:
  • mesh1 (pyFM.mesh.TriMesh) – Source mesh with computed eigenvectors.

  • mesh2 (pyFM.mesh.TriMesh) – Target mesh object with computed eigenvectors.

  • k1 – Dimension to use on the source basis. If None, use all the computed eigenvectors

  • k2

    Dimension to use on the source basis if SD_type is ‘spectral’.

    If None and SD_type is spectral, uses 3*k1

  • p2p

    (n2,) vertex to vertex map between the two meshes.

    If None, set to the identity mapping

  • SD_type

    ‘spectral’ | ‘semican’first option uses the LB basis on the target shape.

    Second option uses the canonical basis on the target shape

Returns:

  • SD_a (np.ndarray) – (k1,k1) Area based shape difference operator

  • SD_c (np.ndarray) – (k1,k1) Conformal shape difference operator