Decomposition
theta_x=atan2(mat(3,2),mat(3,3));
theta_y=atan2(-mat(3,1),sqrt(mat(3,2)*mat(3,3)));
theta_z=atan2(mat(2,1),mat(1,1));
param=[theta_x,theta_y,theta_z,mat(1,4),mat(2,4),mat(3,4)];
Composition:
T1=cos(y)*cos(z);
T2=cos(z)*sin(x)*sin(y)-cos(x)*sin(z);
T3=cos(x)*cos(z)*sin(y)+sin(x)*sin(z);
T5=cos(y)*sin(z);
T6=cos(x)*cos(z)+sin(x)*sin(y)*sin(z);
T7=-cos(z)*sin(x)+cos(x)*sin(y)*sin(z);
T9=-sin(y);
T10=cos(y)*sin(x);
T11=cos(x)*cos(y);
All in matlab code.
No comments:
Post a Comment