moble / quaternionic

Interpret numpy arrays as quaternionic arrays with numba acceleration
MIT License
84 stars 7 forks source link

Convertion to and (specially) from Euler angles in different sequences could be useful. #36

Closed evbernardes closed 2 years ago

evbernardes commented 2 years ago

Yes, agree, Euler angles are terrible.

It would still be nice to have conversions from and to Euler angles in different sequences though, like ZYZ instead of XYZ.

I imagine that there aren't, but still: are there any plans to implement this?

moble commented 2 years ago

First, I'll point out that the convention used in this package is actually what I would call ZYZ — not XYZ.

Second, no, I have no such plans. I know that it would be possible to — for example — accept a string describing the sequence of rotations. But it's very hard to do that and document it in an unambiguous way. The only responsible way to use such code would be to work out for yourself what you think it should mean, and then compare to the actual code. But once you've done all the work to understand it, you might as well just write your own code. The existing functions show how to do it, and you can just overwrite those functions, or add your own under a different name.

evbernardes commented 2 years ago

Understandable, thanks! I really like this project so I'll fork it and try to implement this at some point.