[英]Sympy direction of rotation matrices
我想知道为什么sympy中的旋转矩阵不符合右手定则:
import sympy as sym
print(sym.rot_axis3(sym.Symbol('q')))
产生输出:
[[ cos(q), sin(q), 0],
[-sin(q), cos(q), 0],
[0, 0, 1]]
与右手旋转相比:
[[cos(q), -sin(q), 0],
[sin(q), cos(q), 0],
[0, 0, 1]]
沿相反方向旋转矢量。 在意识到问题之前,这花了我几个小时来寻找方程式中的错误。
rot_axis2
和rot_axis1
也是如此。
在R ^ 3中,当朝原点方向看时,x轴,y轴和z轴在逆时针方向上的坐标系旋转给出了矩阵。
(Goldstein 1980,pp.146-147和608; Arfken 1985,pp.199-200)
另外,如果您查看sympy 文档 :
def rot_axis3(theta):
"""Returns a rotation matrix for a rotation of theta (in radians) about
the 3-axis.
[...]
"""
ct = cos(theta)
st = sin(theta)
lil = ((ct, st, 0),
(-st, ct, 0),
(0, 0, 1))
return Matrix(lil)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.