ttricco / sarracen

A Python library for smoothed particle hydrodynamics (SPH) analysis and visualization.
https://sarracen.readthedocs.io
GNU General Public License v3.0
15 stars 17 forks source link

Default rotation parameters #70

Closed ttricco closed 10 months ago

ttricco commented 10 months ago

Default rotation parameters use the midpoint as the rotation origin. A few stray particles stretching the bounding box can cause the midpoint to become far from the interesting (and intuitive) point of rotation.

This PR adds support for rotation around the centre of mass. For now, the rotation origin is still the midpoint, but a DeprecationWarning is added that the default rotation origin will become [0, 0, 0] in a future version.

Closes #60.