If the x-axis is rotated by X degrees and y, z-axis by Y and Z degrees respectively, then how to find the rotation matrix.
X Y Z are the angles by which each axis is rotated from the reference axis. For a single rotation of 45 degrees about z axis, X=45 Y=45 and Z=0.
I am trying to do this by using the basic mathematical definition of the rotation matrix.
\begin{bmatrix}x1.x0&x1.y0&x1.z0\\y1.x0&y1.y0& y1.z0\\
z1.x0&z1.y0&z1.z0
\end{bmatrix}
When I substitute the values fo dot products (unit vectors) I get \begin{bmatrix}cos(X)&cos(90+Y)&cos(90-Z)\\cos(90-X)&cos(90)& cos(90+Z)\\ cos(90+X)&cos(90-Y)&cos(Z) \end{bmatrix}
This matrix must reduce to the basic rotation matrix of z-axis when Z=0 is substituted, but it is not happening. What's wrong with this approach?