Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% zxz rotation from yxz rotation
- t1 = pi/4 ; % 45 deg
- t2 = pi/6 ; % 30 deg
- t3 = pi/3 ; % 60 deg
- c1 = cos(t1);
- c2 = cos(t2);
- c3 = cos(t3);
- s1 = sin(t1);
- s2 = sin(t2);
- s3 = sin(t3);
- %yaw
- y = [
- c1, 0, s1;
- 0, 1, 0;
- -s1, 0, c1
- ];
- %pitch
- x = [
- 1, 0, 0;
- 0, c2, -s2;
- 0, s2, c2
- ] ;
- %roll
- z = [
- c3, -s3, 0;
- s3, c3, 0;
- 0, 0, 1
- ];
- zxz = [
- c1*c3 - c2*s1*s3, -c1*s3 - c3*c2*s1, s2*s1;
- c2*c1*s3 + c3*s1, c1*c2*c3 - s1*s3, -c1*s2;
- s3*s2, c3*s2, c2
- ]
- yxz = y*x*z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement