https://github.com/thanasi/sharpy
Expand a 3D surface as spherical harmonics Ylm using Monte Carlo integration
####Requirements:
- python (dev using python2.7)
- vtk with python bindings
####Input File Formats Supported:
- STL
####ToDo:
Import STL(testscripts/testSTLPoints)Check if a point is contained within STL(testscripts/testSTLPoints)Visualize points + color based on if in or out(testscripts/testSTLPoints)Implement as library + class(sharpy/shape3d.py, testscripts/testSTLPoints2)Calculate moment of inertia tensor + diagonalize- speed up calculation for large N (parallelize or use numpy tricks. or make a c module)
Visualize eigenvectors of moment of inertia tensorSTL Registration along principal axes of moment of inertia tensor:- center of mass at (0,0,0)
- x = major axis
- y = middle
- z = minor axis
- **this is still slow/fails for meshes with many points
Write surface to output STL- Monte Carlo STintegral against different Ylm to get eigenvalues
- Calculate SphericalHarmonicTransform
- Calculate reverse transform
- Visualize decomposition (eigenvector YLM sized based on eigenvalue)
- Visualize reverse transform and compare to STL