mantaflow
mantaflow copied to clipboard
View BasicParticleSystem Frames in Jupyter Notebooks
Added the BasicParticleSystem.writeParticlesNumPyText() method which serializes the coordinates of the particles in NumPy text format. The NumPy text files can be read from a Jupyter notebook to instantiate NumPy arrays that can be used to visualize the particles in the notebook using the K3D library (https://github.com/K3D-tools/K3D-jupyter).
Thanks for the patch! I wouldn't be opposed to adding the Numpy text export function - it's seems simple enough to be added along the other export options.
The new code in /scenes
is not generic enough to be considered for the main repository. scenes
should only include Python files that showcase some of the core functionality (e.g. a new scene could be added if there is a new plugin).
All in all, this PR would have to be updated first as there have been some bigger changes to the file IO.