marcomusy / vedo

A python module for scientific analysis of 3D data based on VTK and Numpy
https://vedo.embl.es
MIT License
2.04k stars 265 forks source link

Shape decomposition in vtkplotter. #39

Open vianamp opened 5 years ago

vianamp commented 5 years ago

Marco, I've been using spherical harmonics to represent 3D meshes. I am using a package called pyshtools that provides a very simple way of doing the decomposition into spherical harmonics via least square fitting of a list of points (x,y,z). Works fairly well for convex shapes, but it has a hard time to represent well more concave shapes. Before I go ahead and try to improve the reconstruction algorithm, I was wondering whether this sort of shape decomposition is something you are considering to incorporate into vtkPlotter.

Thanks a lot,

marcomusy commented 5 years ago

Indeed we (@gioda ) are currently finalizing a general algorithm that allows to describe/average/interpolate in both space and time arbitrary genus-n meshes.. but this is not yet public... the only examples we have at moment are just the very basic ones about the usage of SHTOOLS in: https://github.com/marcomusy/vtkplotter/blob/master/examples/other/spherical_harmonics1.py https://github.com/marcomusy/vtkplotter/blob/master/examples/other/spherical_harmonics2.py which you've probably seen already..

vianamp commented 5 years ago

Yup, I know those examples and was heavily inspired by them. Good to know you guys are working on this very same problem. I will try to work around with what I have so far and wait till your approach goes public. Will it be part of vtkplotter? By the way, is this a good place for asking questions like this or is there any or channel of your preference?

marcomusy commented 5 years ago

that's fine ;), giovanni is finalizing it.. it will be in a separate project leveraging vtkplotter and shtools.

ps; feel free to contact me at marco.musy at embl.es if you wish!