Matrix transformation vector explained

Disclaimer: This article is a blogger original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_43284188/article/details/97134824

This article is to record their own learning process, since the content of the article refer to "3D mathematical foundation: the graphics and game development", if wrong place, please point out that exchanges make changes.

Almost everywhere in the matrix graphics, projection matrix, view matrix, etc. This series contains a matrix of almost familiar term. A coordinate transformation in the coordinate system of the object multiplied by the model matrix after the world coordinate system is multiplied by a matrix view on the transformation to the camera coordinate system in the coordinate of the world coordinate system, transform these seem reasonable. But their roots, why is multiplied by a matrix can be transformed coordinate it?

This article introduces these questions and instructions. We understand the reason may transform matrix of coordinates, meaning the matrix will have a deeper knowledge and understanding.

Here coordinates are represented by a row vector, P , Q , R & lt respectively used to indicate to point x, y, z axis positive direction of the unit vector.
There are a coordinate point A (1,2,3), as represented by a vector A = [2. 1. 3].
Wherein the vector A can be decomposed into the following form: A =. 1 [0 0. 1] +2 [0. 1 0] +3 [0 0. 1]. 1 = P +2 Q +3 R & lt

While Eq. 1 P +2 Q +3 R & lt be interpreted as a unit of displacement in the x-axis direction, y-axis direction displacement unit 2, z-axis direction displacement three units.
Further Equation. 1 P +2 Q +3 R & lt deformation can be obtained:
. 1 P +2 Q +3 R & lt =
[ 1 p x + 2 q x + 3 r x 1 p y + 2 q y + 3 r y 1 p z + 2 q z + 3 r z ] = [ 1 2 3 ] [ p x p y p z q x q y q z r x r y r z ] \left[ \begin{matrix} 1px+2qx+3rx & 1py+2qy+3ry & 1pz+2qz+3rz \\ \end{matrix} \right] = \left[ \begin{matrix} 1 & 2 & 3 \\ \end{matrix} \right] \left[ \begin{matrix} px & py & pz \\ qx & qy & qz \\ rx & ry & rz \end{matrix} \right]
Can see the final result obtained is a vector A is multiplied with a matrix, and careful observation of the form of a matrix can be found,A set of row vectors of the matrix has exactly the base coordinate system, so that we can be interpreted as a matrix of basis vectors. This matrix is ​​shown below:

[ p x p y p z q x q y q z r x r y r z ] \left[ \begin{matrix} px & py & pz \\ qx & qy & qz \\ rx & ry & rz \end{matrix} \right]
The vectors thus multiplied with different matrices, can be seen as a vector to switch to a different coordinate system based vector. E.g:
[ 1 2 3 ] [ 1 0 0 0 2 0 0 0 1 ] = [ 1 4 3 ] \left[ \begin{matrix} 1 & 2 & 3 \\ \end{matrix} \right] \left[ \begin{matrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1 \end{matrix} \right] = \left[ \begin{matrix} 1 & 4 & 3 \\ \end{matrix} \right]
Above equation can be interpreted to convert the point A to the x, z-axis base vectors are (1,0,0), (0,0,1), while the y-axis base vector is (0,2,0) of β coordinate system, the last coordinate in the coordinate system is in the β (1,4,3). The initial position (2,3) in which the point A is x, y, z-axis base vectors are (1,0,0), (0,1,0), (0,0,1) coordinate system.

Guess you like

Origin blog.csdn.net/weixin_43284188/article/details/97134824