nmwsharp / potpourri3d

An invigorating blend of 3D geometry tools in Python.
MIT License
440 stars 35 forks source link

Feature Request : Connection Laplacian (to project DiffusionNet gradients in spectral basis) #6

Open nicolasdonati opened 2 years ago

nicolasdonati commented 2 years ago

Thank you for this super useful tool ! At present, we cannot have access to the connection Laplacian operator used for Heat Diffusion on tangent vector fields (defined on vertices). It would be useful to be able to access it from the solver (with point cloud and with mesh if possible), for instance L = solver.connection_laplacian() The idea would be to use this laplacian to write gradients (defined at points) in spectral basis. In this spirit, it could be useful to access gradient operators from within the solver too (since they have to be written in the local complex basis at each point which has to be the same as the one for the laplacian I suppose) for instance G = solver.complex_gradient(). Alternatively, one could use for instance gradients defined in DiffusionNet but they would have to agree with the local basis of the connection Laplacian of the solver.

I hope this is enough information, thanks again for your huge help !

maolingao commented 2 months ago

Hi Nick, thanks so much for the great tool.

It would be also useful to have an api to the point cloud connection laplacian, with the similar syntax L = solver.connection_laplacian() as in the case of mesh (which has been introduced already in the code base).

Do you think it's easy to introduce a projection operator, which projects (general) vectors defined on each vertex onto its tangent plane? The projected tangent vector component should be also represented in the local basis (used by the connection laplacian internally.) A possible api for this could be: vectors_tangent = solver.proj_tangent(vectors).

Many thanks in advance for your huge contribution to the community!