ENH: Implemented Rotation.from_davenport and Rotation.as_davenport #17728

"Evandro Bernardes" <[email protected]>
Newsgroups gmane.comp.python.scientific.devel
Message-ID <[email protected]>
This is a follow-up to #17392. Also, this might be a bit niche, so a big part of this post is to see if there is any interest to it.
 
Davenport angles are a generalization of Euler angles.

Implemented the function `Rotation.as_davenport`, and for convenience, an inverse function called `Rotation.from_davenport` that makes internal calls to `Rotation.from_rotvec` but using the same type of parameters as `Rotation.as_davenport`. 

- Additional information:

Not any generalization is possible, basically we must have `dot(n1, n2) = dot(n2, n3) = 0`, like in Euler angles.
Moreover, for Euler angles: `dot(n1, n3) = 0, 1` or `-1`. For Davenport angles, this last can be any value between `-1` and `1` instead. Source: https://doi.org/10.1007/BF03546304.

This is a follow-up to my implementation of a new algorithm for `Rotation.as_euler()` (based on https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0276302). I now implemented a slightly modified version of the same algorithm to compute the Davenport angles for a set of input axes in the function.

In this implementation, there may be some set differences between the angles computed for the same axes by `Rotation.as_davenport` and `Rotation.as_euler` for some asymmetrical cases, but these different angles represent the same final rotation.
_______________________________________________
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.