Workshop video proposal: quaternion functions

7 views
Skip to first unread message

Joseph Malloch

unread,
Sep 14, 2022, 4:57:21 PM9/14/22
to dot_mapper
Here is my proposal for adding quaternion functions to the libmapper expression engine. Feedback is welcome!


Cheers,
Joe

Travis West

unread,
Sep 20, 2022, 9:14:00 AM9/20/22
to dot_m...@googlegroups.com
I think having quaternion functions would be a great addition to the library. It could also be worthwhile to have functions for extracting euler angles, and pointing direction representations such as columns of the associsted rotation matrix or azimuth and altitude / latitude and longitude. We've found directional info such as this to be especially useful for the mubone, and I believe the Airsticks presented at NIME this year independently happened on the same.

On the other hand, anything involving angles immediately raises issues about coordinate systems that maybe it would be better to avoid? Left hand vs right hand coordinate axes, which axis is up and down, etc... And I guess it should be possible to calculate your own angles using trig functions once you have the rotation matrix columns.

So I would definitely push for being able to access the rotation matrix columns (e.g. xbasis(quaternion) -> vec3, the first column of the associated rotation matrix), or more generally to also include methods for treating a vector of nine floats as a 3x3 matrix. In the latter case, it begs the question whether to include more general NxM matrix handling methods though...

One last thought: how should the quaternion elements be ordered? I've seen both wxyz and xyzw in the wild, so maybe both need to be supported with alternative functions or a flag argument to switch between the two? Or maybe this can be encoded in the unit string by convention?

TW

--
You received this message because you are subscribed to the Google Groups "dot_mapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dot_mapper+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dot_mapper/dc937579-ea8c-44f6-b461-7e9af1bfe227n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages