   Extracting Axes From Rotation Matrix
  Hi, i am beginner to the 3d math.i want to confirm the way to extract the axes from a rotation matrix.according some tutorials on the web, (1)if the row -vector convention is used, (i.e,v'= v*m0*m1)   the axis of rotated coordinate space is the column of rotation matrix.(2) if the column-vector is used,   the axis is the row of rotation matrix.   i found the ogre which using the column-vector conventioon extract the column of rotation matrix as axes. i doubt that handedness of coordinate system should be involved when extracting the axes from rotation matrix, is it correct?   
Quote:Original post by kamimailHi, i am beginner to the 3d math.i want to confirm the way to extract the axes from a rotation matrix.according some tutorials on the web, (1)if the row -vector convention is used, (i.e,v'= v*m0*m1)   the axis of rotated coordinate space is the column of rotation matrix.(2) if the column-vector is used,   the axis is the row of rotation matrix.   i found the ogre which using the column-vector conventioon extract the column of rotation matrix as axes. i doubt that handedness of coordinate system should be involved when extracting the axes from rotation matrix, is it correct?Well, these expressions do not have a meaning:-"the axis of rotated coordinate space"-"the column of rotation matrix"-"the row of rotation matrix"A system of coordinates does not have a single axis( the word "vector" would be more appropriate ). Neither a rotated one."The column of rotation matrix"? A rotation matrix has more than one column: which column?The same for "the row".You shouldn't confuse these things: "system of coordinates" and "matrix". A matrix doesn't represent a system of coordinates. An orientation, yes, but not a system of coordinates.editWell, after reading jyk post I understand what you meant. It's unfortunate that people don't use the correct wording to describe mathematical things.[Edited by - johnstanp on May 11, 2010 3:13:49 PM];Quote:according some tutorials on the web, (1)if the row -vector convention is used, (i.e,v'= v*m0*m1)   the axis of rotated coordinate space is the column of rotation matrix.(2) if the column-vector is used,   the axis is the row of rotation matrix.Generally speaking, the above statements are incorrect (although they may be correct in the context in which they were made).If row-vector notation is being used, the axes are typically the rows of the matrix; if column-vector notation is being used, the axes are typically the columns of the matrix.Sometimes though people will want to extract the axes (direction vectors) from a view matrix rather than a 'model' matrix. Although this is kind of a silly thing to do in most cases (IMO), I think the need commonly arises because a 'look at' function has been used to build the matrix, and so no 'non-inverted' version of the matrix is available.In a 'view' matrix, the upper-left 3x3 portion of the matrix is transposed relative to the non-inverted version of the matrix, which means that for row-vector notation the axes will reside in the columns and vice versa. I imagine this is the context in which the above statements were made.So in summary:- row vectors, model matrix: axes in rows- row vectors, view matrix: axes in columns- column vectors, model matrix: axes in columns- column vectors, view matrix: axes in rowsQuote:i found the ogre which using the column-vector conventioon extract the column of rotation matrix as axes.I imagine that the expectation in this case is that the matrix from which the axes are being extracted represents a 'model' transform, in which case the Ogre method would be correct.Quote:i doubt that handedness of coordinate system should be involved when extracting the axes from rotation matrix, is it correct?In general, it shouldn't. However, I think I have seen people try to 'correct for' handedness when extracting the z axis from a camera matrix, so I suppose in practice, handedness can be a factor in some cases.   ;  thank you for your all replyQuote:editWell, after reading jyk post I understand what you meant. It's unfortunate that people don't use the correct wording to describe mathematical things.Hi,johnstanp,i am sorry, i am not a native english speaker, but i will make an effort to improve my english skill. :)Hi jvk,   i have undestood it.think you! you have profound knowledge about math.[Edited by - kamimail on May 11, 2010 9:27:32 PM]