Skip to content

Instantly share code, notes, and snippets.

Last active July 10, 2020 18:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import igl
import numpy as np
import polyscope as ps
import scipy
path = "/Users/cbabraham/data/mesh/spot/spot_triangulated.obj"
verts,faces = igl.read_triangle_mesh(path)
original = ps.register_surface_mesh("mesh", verts, faces)
L = igl.cotmatrix(verts, faces)
M = igl.massmatrix(verts, faces)
# eigendecomposition of the laplacian
eigenvals, eigenvecs = scipy.sparse.linalg.eigsh(L, 6, M)
for i, eigenvector in enumerate(eigenvecs.swapaxes(0,1)):
eigenvector.astype(np.float32), # discard complex components
Copy link

Not sure exactly what I was expecting but this doesn't seem right.
Screen Shot 2020-07-10 at 10 37 44 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment