`sympy.vector.CoordSysCartesian.rotation_matrix`的修正定义是什么?

时间:2017-03-01 14:35:01

标签: python sympy rotational-matrices

旋转矩阵可以用两种方式编写。

使用单位向量,

[ ex_0 ex_1 ex_2]
[ ey_0 ey_1 ey_2]
[ ez_0 ez_1 ez_2]

或使用单位向量

[ ex_0 ey_0 ez_0]
[ ex_1 ey_1 ez_1]
[ ex_2 ey_2 ez_2]

在下面的代码中使用了哪个定义? DCM是行格式还是列格式?

from sympy.vector import CoordSysCartesian
from sympy import symbols, pi, Matrix
theta = symbols('theta')
N = CoordSysCartesian('N')
A = N.orient_new_axis('A', theta, N.k)
dcm = N.rotation_matrix(A).subs({'theta':pi/2})

输出,

Matrix([
[0, -1, 0],
[1,  0, 0],
[0,  0, 1]])

0 个答案:

没有答案