STENDEC
- 21
- 0
I'm trying to rotate a point about the origin (0,0,0) and starting with an identity matrix, this works fine for the x- and y-rotation axes, but fails with the z-axis, where the point just sits in place.
\begin{bmatrix}<br /> 1 & 0 & 0 \\<br /> 0 & 1 & 0 \\<br /> 0 & 0 & 1<br /> \end{bmatrix}<br /> M_{ID}<br /> \times<br /> M_Z<br /> \begin{bmatrix}<br /> cos(\phi) & sin(\phi) & 0 \\<br /> -sin(\phi) & cos(\phi) & 0 \\<br /> 0 & 0 & 1<br /> \end{bmatrix}<br />
I imagine the point is sitting on the z-axis, thus rotating around itself. I'm not sure how to modify the identity matrix to reposition it so that it rotates around the origin like with the other axes. I hope someone can point out to me what's needed here. Thanks.
\begin{bmatrix}<br /> 1 & 0 & 0 \\<br /> 0 & 1 & 0 \\<br /> 0 & 0 & 1<br /> \end{bmatrix}<br /> M_{ID}<br /> \times<br /> M_Z<br /> \begin{bmatrix}<br /> cos(\phi) & sin(\phi) & 0 \\<br /> -sin(\phi) & cos(\phi) & 0 \\<br /> 0 & 0 & 1<br /> \end{bmatrix}<br />
I imagine the point is sitting on the z-axis, thus rotating around itself. I'm not sure how to modify the identity matrix to reposition it so that it rotates around the origin like with the other axes. I hope someone can point out to me what's needed here. Thanks.