我可以使用哪些欧拉旋转?

发布于 2024-08-26 11:41:56 字数 221 浏览 4 评论 0原文

我有两个笛卡尔坐标。有 xyz 和 BIG XYZ。我想让它们彼此平行。例如,x 与 X 平行,y 与 Y 平行,z 与 Z 平行。我使用旋转矩阵,但我有很多不同的旋转矩阵。例如,我在 xyz 笛卡尔坐标中有一个 3D 点,它被称为 A,我想将笛卡尔坐标更改为 BIG XYZ,并在该坐标中找到相同的 3D 点,它被称为 B。到目前为止,还可以。但是当我使用不同的旋转矩阵时,点发生了变化。我能做些什么?我可以使用哪些欧拉旋转?

I have two Cartesian coordinates. There are xyz and BIG XYZ. I want to make these are parallel to each other. For example, x paralel to X ,y parallel to Y and z paralel to Z. I use a rotation matrix but I have a lot of different rotation matrices. For example I have 3D point in xyz Cartesian coordinates and it's called A and I want to change Cartesian coordinate to BIG XYZ and find the same 3D point in this coordinates its called B. Until now it is okay. But when I used a different rotational matrix, points were changed. What can I do? Which Euler rotations can I use?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

茶色山野 2024-09-02 11:41:56

这是您要找的吗?

% an orthonormal base ('old')
x = [1; 0; 0];
y = [0; 1; 0];
z = [0; 0; 1];

% orthogonal (=rotation) matrix having this base as its columns
Rold = [x, y, z]; 

% another orthonormal base ('new')
X = [1;  1; 0]/sqrt(2);
Y = [-1; 1; 1]/sqrt(3);
Z = [1; -1; 2]/sqrt(6);

% orthogonal matrix having this basis as its columns
Rnew = [X, Y, Z]; 

% a "point" (indeed a vector; coordinates are with respect to the 'old' base,
% so this is actually the point 1*x + 2*y + 3*z)
A = [1; 2; 3]

% point = [x y z] A = [x y z] |1| = [X Y Z] |p| = [X Y Z] B
%                             |2|           |q|
%                             |3|           |r|
% where p,q,r are the unknown coordinates in the 'new' base
% To find them, just multiply by the inverse (=transpose) of [X Y Z]
B = Rnew'*Rold*A

% Rnew'*Rold, i.e. transpose(Rnew)*Rold is the rotation you are searching

Is this what you are looking for?

% an orthonormal base ('old')
x = [1; 0; 0];
y = [0; 1; 0];
z = [0; 0; 1];

% orthogonal (=rotation) matrix having this base as its columns
Rold = [x, y, z]; 

% another orthonormal base ('new')
X = [1;  1; 0]/sqrt(2);
Y = [-1; 1; 1]/sqrt(3);
Z = [1; -1; 2]/sqrt(6);

% orthogonal matrix having this basis as its columns
Rnew = [X, Y, Z]; 

% a "point" (indeed a vector; coordinates are with respect to the 'old' base,
% so this is actually the point 1*x + 2*y + 3*z)
A = [1; 2; 3]

% point = [x y z] A = [x y z] |1| = [X Y Z] |p| = [X Y Z] B
%                             |2|           |q|
%                             |3|           |r|
% where p,q,r are the unknown coordinates in the 'new' base
% To find them, just multiply by the inverse (=transpose) of [X Y Z]
B = Rnew'*Rold*A

% Rnew'*Rold, i.e. transpose(Rnew)*Rold is the rotation you are searching
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文