【源码】简单四元数和三维旋转函数库
这个简单的函数库使用四元数和R^4之间的同构在Matlab中实现四元数代数仿真。
This simple library implements the quaternion algebra in Matlab using the isomorphism between quaternions and R^4.
还实现了欧拉角、罗德里格斯公式和四元数版本的多种组合的旋转矩阵。
It also implements the rotation matrices for many combinations of Euler angles and the Rodrigues' Formula and the quaternion version.
该函数库还包含3D可视化工具。
This library also contains a 3D Visualization tool.
主要函数概括如下:
Summarized description functions:
The sum and subtraction is normally performed by Matlab as R^4 vectors.
conjugate
division on the left
division on the right
exponential
inverse
absolute value
plot of coordinates in 3D
product
product with dot and cross commands
matrix isomorphism 1
matrix isomorphism 2
rotation
to string
Rx
Ry
Rz
Rxyz -- and others combinations of Euler Angles.
Time derivative of Rxyz
Rot Rodrigues
完整源码下载请点击“阅读原文”