DEV Community

Trinity
Trinity

Posted on

Matrix Manipulation in 3d Graphics

Translation

Rotation

Scale

TranslateRotateScale[1005010300120001][0100100000100001][2000020000200001]=Scale, then Rotate, then Translate\text{Translate} \cdot \text{Rotate} \cdot \text{Scale} \newline \begin{bmatrix} 1 & 0 & 0 & 5 \\ 0 & 1 & 0 & 3 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} 2 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & 2 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} = \text{Scale, then Rotate, then Translate}

Top comments (0)