[Proposal] Extension to scipy.spatial.transform for 3D Translations and Proper Rigid Transformations
[email protected] Sun, 17 Sep 2023 22:21:17 -0000
| Newsgroups | gmane.comp.python.scientific.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello SciPy dev community, I've opened a GitHub issue proposing an extension to the scipy.spatial.transform module. The idea is to add 3D translation capabilities, as well as full proper rigid transformations that combine 3D rotations and translations. This allows for defining arbitrary coordinate frames in 3D space. Please see the detailed proposal at this link, and below I've summarized the key points. https://github.com/scipy/scipy/issues/19254 What's Proposed? * A Translation class to handle 3D translational offsets. * A Transformation class for 3D rigid transformations, built up from composing any number of Rotations and Translations. * Top level interpolation methods for both, analagous to Slerp and RotationSpline. Why? Defining and manipulating 3D coordinate frames is indispensable in the fields of robotics, aerospace, and computer graphics, and I believe is more broadly applicable over many more domains as well. Quick API Example ``` t = Translation.from_vector([x, y, z]) t.apply([a, b, c]) == np.array([a + x, b + y, c + z]) t.inv() == Translation.from_vector([-x, -y, -z]) r = Rotation.from_rotvec([u, v, w]) T1 = t * r # Generate a Transformation by composing translations and rotations with __mul__ T1.apply([a, b, c]) == np.array([x, y, z]) + r.apply([a, b, c]) T1.inv() == r.inv() * t.inv() T1 * T2.inv() # Coordinate frame T1 as measured in reference frame T2 ``` What's Next? * Are you in favor of inclusion of this capability into SciPy? * Suggestions on API / naming / functionality? * Suggestions on how to conduct this work? One large PR vs building up via chunks? Thank you very much for considering this, and I look forward to hearing your feedback. Cheers, Scott Shambaugh _______________________________________________ SciPy-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/scipy-dev.python.org/ Member address: [email protected]