Shearing Type | Equation Form | Matrix Form |
Shearing in 2D |
\(x' = x + (s_x \times y)\) \(y' = y + (s_y \times x) \) |
\(\begin{bmatrix} 1 & s_x \\s_y & 1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} x' \\ y' \end{bmatrix}\) |
Shearing in 3D |
\(x' = x + (s_{xy} \times y) + (s_{xz} \times z)\) \(y' = y + (s_{yx} \times x) + (s_{yz} \times z)\) \(z' = z + (s_{zx} \times x) + (s_{zy} \times y)\) |
\(\begin{bmatrix} 1 & s_{xy} & s_{xz} \\s_{yx} & 1 & s_{yz}\\s_{zx} & s_{zy} & 1\end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\) |
Shearing Scale Factor | Meaning |
\(s_x\) | Scale factor for y axis to bring about shearing along x axis in 2D |
\(s_y\) | Scale factor for x axis to bring about shearing along y axis in 2D |
\(s_{xy}, s_{xz}\) | Scale factor for y and z axis respectively to bring about shearing along x axis in 3D |
\(s_{yx}, s_{yz}\) | Scale factor for x and z axis respectively to bring about shearing along y axis in 3D |
\(s_{zx}, s_{zy}\) | Scale factor for x and y axis respectively to bring about shearing along z axis in 3D |
Derivation Type | Derivation |
Matrix Multiplication | \(\begin{bmatrix} 1 & 0 & o_x \\ 0 & 1 & o_y \\0 & 0 & 1\end{bmatrix} \begin{bmatrix} 1 & s_x & 0 \\ s_y & 1 & 0 \\0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & -o_x \\ 0 & 1 & -o_y \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} = \begin{bmatrix} 1 & s_x & -s_x \times o_y\\s_y & 1 & -s_y \times o_x\\0 & 0 & 1\end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} \) |
Equations |
\(x' = x + (s_x \times y) - (s_x \times o_y)\) \(y' = y + (s_y \times x) - (s_y \times o_x)\) |
Derivation Type | Derivation |
Matrix Multiplication | \(\begin{bmatrix} 1 & 0 & 0 & o_x \\ 0 & 1 & 0 & o_y \\0 & 0 & 1 & o_z \\0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & s_{xy} & s_{xz} & 0 \\ s_{yx} & 1 & s_{yz} & 0 \\s_{zx} & s_{zy} & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 & -o_x \\ 0 & 1 & 0 & -o_y \\ 0 & 0 & 1 & -o_z \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} = \begin{bmatrix} 1 & s_{xy} & s_{xz} & -s_{xy} \times o_y -s_{xz} \times o_z\\s_{yx} & 1 & s_{yz} & -s_{yx} \times o_x - s_{yz} \times o_z\\s_{zx} & s_{zy} & 1 & -s_{zx} \times o_x -s_{zy} \times o_y\\0 & 0 & 0 & 1\end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} \) |
Equations |
\(x' = x + (s_{xy} \times y) + (s_{xz} \times z) - (s_{xy} \times o_y) - (s_{xz} \times o_z)\) \(y' = y + (s_{yx} \times x) + (s_{yz} \times z) - (s_{yx} \times o_x) - (s_{yz} \times o_z) \) \(z' = z + (s_{zx} \times x) + (s_{zy} \times y) - (s_{zx} \times o_x) - (s_{zy} \times o_y)\) |