How to convert a right handed rotation matrix into a left handed one?

조회 수: 37 (최근 30일)
Nora Hora
Nora Hora 2017년 1월 25일
댓글: Niels 2017년 1월 25일
Previsouly I used this(page 7): http://answers.unity3d.com/storage/temp/12048-lefthandedtorighthanded.pdf to transform my rotational matrix into a right handed one. Now I would like to make the opposite with a right handed one into left. Is there any suggestion? See my left to right conversion which is based on this paper.
[RH_R]=left_to_right(R_cw, alpha, beta, gamma)
%%left-handed rotation angles
theta_x = gamma;
theta_y = beta;
theta_z = alpha;
%%left-handed coordinate rotation matrices
R_cw_X = [1 0 0; 0 cos(theta_x) -sin(theta_x); 0 sin(theta_x) cos(theta_x)];
R_cw_Y = [cos(theta_y) 0 sin(theta_y); 0 1 0; -sin(theta_y) 0 cos(theta_y)];
R_cw_Z = [cos(theta_z) -sin(theta_z) 0; sin(theta_z) cos(theta_z) 0; 0 0 1];
%%left-handed composite rotation
LH_R= R_cw_Z * R_cw_Y * R_cw_X;
%%right-handed composite rotation
RH_R=LH_R;
RH_R(1,3) = -RH_R(1,3);
RH_R(2,3) = -RH_R(2,3);
RH_R(3,1) = -RH_R(3,1);
RH_R(3,2) = -RH_R(3,2);

답변 (1개)

Niels
Niels 2017년 1월 25일
to change the direction of rotation it is enough to transpose the rotation matrix
if matrix A rotates clockwise then
A' rotates anticlockwise
  댓글 수: 1
Niels
Niels 2017년 1월 25일
same for the opposite case.
you could also just use the negativ angle (same effect) -> replace theta with -theta)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Cartesian Coordinate System Conversion에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by