HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-02-28
1 <p>The transformation matrices can be classified into different types based on the specific transformation, such as:</p>
1 <p>The transformation matrices can be classified into different types based on the specific transformation, such as:</p>
2 <ul><li>Translation Matrix</li>
2 <ul><li>Translation Matrix</li>
3 </ul><ul><li>Rotation Matrix</li>
3 </ul><ul><li>Rotation Matrix</li>
4 </ul><ul><li>Scaling Matrix</li>
4 </ul><ul><li>Scaling Matrix</li>
5 </ul><ul><li>Composite Matrix</li>
5 </ul><ul><li>Composite Matrix</li>
6 </ul><ul><li>Reflection Matrix</li>
6 </ul><ul><li>Reflection Matrix</li>
7 </ul><ul><li>Shear Matrix</li>
7 </ul><ul><li>Shear Matrix</li>
8 </ul><ul><li>Affine Transformation Matrix</li>
8 </ul><ul><li>Affine Transformation Matrix</li>
9 </ul><p><strong>Translation Matrix</strong></p>
9 </ul><p><strong>Translation Matrix</strong></p>
10 <p>The translation matrix is used to move the object along one or more axes (x, y, z), without changing the shape and orientation. Now let’s learn how it works, consider the point \(P = (x, y, z) \) in 3D space and apply the translation vector \(T = (Tx, TY, Tz) \).</p>
10 <p>The translation matrix is used to move the object along one or more axes (x, y, z), without changing the shape and orientation. Now let’s learn how it works, consider the point \(P = (x, y, z) \) in 3D space and apply the translation vector \(T = (Tx, TY, Tz) \).</p>
11 <p>Here, the translation matrix is \(\begin{bmatrix} 1 &amp; 0 &amp; 0 &amp; T_x \\ 0 &amp; 1 &amp; 0 &amp; T_y \\ 0 &amp; 0 &amp; 1 &amp; T_z \\ 0 &amp; 0 &amp; 0 &amp; 1 \end{bmatrix} \)</p>
11 <p>Here, the translation matrix is \(\begin{bmatrix} 1 &amp; 0 &amp; 0 &amp; T_x \\ 0 &amp; 1 &amp; 0 &amp; T_y \\ 0 &amp; 0 &amp; 1 &amp; T_z \\ 0 &amp; 0 &amp; 0 &amp; 1 \end{bmatrix} \)</p>
12 <p>Representing the point P using a matrix: \(P = \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} \)</p>
12 <p>Representing the point P using a matrix: \(P = \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} \)</p>
13 <p>Multiplying the transformation matrix by point p:</p>
13 <p>Multiplying the transformation matrix by point p:</p>
14 <p>\(\begin{bmatrix} 1 &amp; 0 &amp; 0 &amp; T_x \\ 0 &amp; 1 &amp; 0 &amp; T_y \\ 0 &amp; 0 &amp; 1 &amp; T_z \\ 0 &amp; 0 &amp; 0 &amp; 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} = \begin{bmatrix} x + T_x \\ y + T_y \\ z + T_z \\ 1 \end{bmatrix} \)</p>
14 <p>\(\begin{bmatrix} 1 &amp; 0 &amp; 0 &amp; T_x \\ 0 &amp; 1 &amp; 0 &amp; T_y \\ 0 &amp; 0 &amp; 1 &amp; T_z \\ 0 &amp; 0 &amp; 0 &amp; 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} = \begin{bmatrix} x + T_x \\ y + T_y \\ z + T_z \\ 1 \end{bmatrix} \)</p>
15 <p><strong>Rotation Matrix</strong></p>
15 <p><strong>Rotation Matrix</strong></p>
16 <p>A rotation matrix is used to rotate vectors or points in a coordinate plane. In 2D, rotation is performed by a certain angle around a specific axis. In 3D, it occurs around a defined axis. </p>
16 <p>A rotation matrix is used to rotate vectors or points in a coordinate plane. In 2D, rotation is performed by a certain angle around a specific axis. In 3D, it occurs around a defined axis. </p>
17 <p>For example, consider a point \(P = (x, y) \)in 2D. To rotate this point counterclockwise around the origin by an angle θ, we apply the 2D rotation matrix. </p>
17 <p>For example, consider a point \(P = (x, y) \)in 2D. To rotate this point counterclockwise around the origin by an angle θ, we apply the 2D rotation matrix. </p>
18 <p>Representing the point P(x, y) as: \(x = r cos ϕ \) \(y = r sin ϕ\)</p>
18 <p>Representing the point P(x, y) as: \(x = r cos ϕ \) \(y = r sin ϕ\)</p>
19 <p>After rotation new coordinate (x′, y′) becomes: \(x′ = r cos (ϕ + θ) = x cosθ - y sinθ \) \(y′ = r sin (ϕ + θ) = x sinθ + y cosθ\)</p>
19 <p>After rotation new coordinate (x′, y′) becomes: \(x′ = r cos (ϕ + θ) = x cosθ - y sinθ \) \(y′ = r sin (ϕ + θ) = x sinθ + y cosθ\)</p>
20 <p>It can be represented in matrix form as:</p>
20 <p>It can be represented in matrix form as:</p>
21 <p>\([x′y′] = [cos⁡θ - sin⁡θ sin⁡θ cos⁡θ][xy]\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos \theta &amp; -\sin \theta \\ \sin \theta &amp; \cos \theta \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}\)</p>
21 <p>\([x′y′] = [cos⁡θ - sin⁡θ sin⁡θ cos⁡θ][xy]\begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos \theta &amp; -\sin \theta \\ \sin \theta &amp; \cos \theta \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}\)</p>
22 <p><strong>Scaling Matrix</strong></p>
22 <p><strong>Scaling Matrix</strong></p>
23 <p>A scaling matrix is used to resize any object by expanding or contracting its vertices along the axes. Here, we multiply each coordinate of the vectors by the scaling<a>factor</a>. If the scaling factor is<a>greater than</a>1, then the object expands, and if the scaling factor is<a>less than</a>1, the object contracts. </p>
23 <p>A scaling matrix is used to resize any object by expanding or contracting its vertices along the axes. Here, we multiply each coordinate of the vectors by the scaling<a>factor</a>. If the scaling factor is<a>greater than</a>1, then the object expands, and if the scaling factor is<a>less than</a>1, the object contracts. </p>
24 <p>For example, the coordinates (X, Y) are scaled using the factors (SX, SY). Let’s consider the new coordinates (X′, Y′) So, \(X' = X \cdot S_X \) \(Y' = Y \cdot S_Y \) It can be represented in matrix operations as: </p>
24 <p>For example, the coordinates (X, Y) are scaled using the factors (SX, SY). Let’s consider the new coordinates (X′, Y′) So, \(X' = X \cdot S_X \) \(Y' = Y \cdot S_Y \) It can be represented in matrix operations as: </p>
25 <p><strong>Composite Matrix</strong></p>
25 <p><strong>Composite Matrix</strong></p>
26 <p>In a matrix, if we apply<a>multiple</a>transformations like scaling, translation, rotation, etc., in a sequence. Since matrix multiplication is non-commutative, the order of multiplication is important.</p>
26 <p>In a matrix, if we apply<a>multiple</a>transformations like scaling, translation, rotation, etc., in a sequence. Since matrix multiplication is non-commutative, the order of multiplication is important.</p>
27 <p>For example, translating the point \(P(1, 2) \) by \((3, 4)\) and then rotating it by 90° counterclockwise The given point \(P = (1, 2)\) \(T = (3, 4)\) \(θ = 90° \)</p>
27 <p>For example, translating the point \(P(1, 2) \) by \((3, 4)\) and then rotating it by 90° counterclockwise The given point \(P = (1, 2)\) \(T = (3, 4)\) \(θ = 90° \)</p>
28 <p>Writing the points in matrix form:</p>
28 <p>Writing the points in matrix form:</p>
29 <p>To apply translation, we multiply T and \(P (T \cdot P) \)</p>
29 <p>To apply translation, we multiply T and \(P (T \cdot P) \)</p>
30 <p>Thus, the translated point is \((4, 6)\)</p>
30 <p>Thus, the translated point is \((4, 6)\)</p>
31 <p>Then, rotate the matrix 90° counterclockwise about the origin. To find the rotation matrix, we use the<a>formula</a>, \(y'x' = (\sin\theta\cos\phi - \cos\theta\sin\phi) \, yx \) So, \(R = \begin{bmatrix} \sin(90^\circ)\cos(90^\circ) &amp; \cos(90^\circ) - \sin(90^\circ) \\ 1 &amp; 0 - 1 \end{bmatrix} \) </p>
31 <p>Then, rotate the matrix 90° counterclockwise about the origin. To find the rotation matrix, we use the<a>formula</a>, \(y'x' = (\sin\theta\cos\phi - \cos\theta\sin\phi) \, yx \) So, \(R = \begin{bmatrix} \sin(90^\circ)\cos(90^\circ) &amp; \cos(90^\circ) - \sin(90^\circ) \\ 1 &amp; 0 - 1 \end{bmatrix} \) </p>
32 <p>Here \((x, y) = (4, 6)\) \(\begin{bmatrix} 1 &amp; \Box \\ 0 &amp; -1 \end{bmatrix} \begin{bmatrix} 6 \\ 4 \end{bmatrix} = \begin{bmatrix} 1 \cdot 4 + 0 \cdot 6 \\ 0 \cdot 4 + (-1) \cdot 6 \end{bmatrix} \) \(= 4-6 \)</p>
32 <p>Here \((x, y) = (4, 6)\) \(\begin{bmatrix} 1 &amp; \Box \\ 0 &amp; -1 \end{bmatrix} \begin{bmatrix} 6 \\ 4 \end{bmatrix} = \begin{bmatrix} 1 \cdot 4 + 0 \cdot 6 \\ 0 \cdot 4 + (-1) \cdot 6 \end{bmatrix} \) \(= 4-6 \)</p>
33 <p>Thus, the point after rotation is (-6, 4)</p>
33 <p>Thus, the point after rotation is (-6, 4)</p>
34 <p><strong>Reflection Matrix</strong></p>
34 <p><strong>Reflection Matrix</strong></p>
35 <p>The transformation matrix is used to create mirror images of a shape. Here, the coordinates will be reversed, but the size and shape of the object remain the same. For example, reflecting a point p(1, 2) across the x-axis The reflection matrix across the x-axis can be represented as:</p>
35 <p>The transformation matrix is used to create mirror images of a shape. Here, the coordinates will be reversed, but the size and shape of the object remain the same. For example, reflecting a point p(1, 2) across the x-axis The reflection matrix across the x-axis can be represented as:</p>
36 <p>\(Rx = Rx = [100-1]R_x = \begin{bmatrix}1 &amp; 0 \\ 0 &amp; -1\end{bmatrix} \)</p>
36 <p>\(Rx = Rx = [100-1]R_x = \begin{bmatrix}1 &amp; 0 \\ 0 &amp; -1\end{bmatrix} \)</p>
37 <p>Representing the point P(1, 2) in matrix \(P = 21 \) Now, to find the reflection matrix, we multiply Rx and P</p>
37 <p>Representing the point P(1, 2) in matrix \(P = 21 \) Now, to find the reflection matrix, we multiply Rx and P</p>
38 <p>\([100-1][12]=[1-2]\begin{bmatrix}1 &amp; 0 \\ 0 &amp; -1\end{bmatrix} \begin{bmatrix}1 \\ 2\end{bmatrix} = \begin{bmatrix}1 \\ -2\end{bmatrix} \)</p>
38 <p>\([100-1][12]=[1-2]\begin{bmatrix}1 &amp; 0 \\ 0 &amp; -1\end{bmatrix} \begin{bmatrix}1 \\ 2\end{bmatrix} = \begin{bmatrix}1 \\ -2\end{bmatrix} \)</p>
39 <p>\(R_x \cdot P = \begin{bmatrix} 0 &amp; 1 \\ -1 &amp; 0 \\ 2 &amp; 1 \end{bmatrix} \) \(= \begin{bmatrix} 0 \cdot 1 + (-1) \cdot 2 &amp; 1 \cdot 1 + 0 \cdot 2 \end{bmatrix} \) \(= \begin{bmatrix} -2 &amp; 1 \end{bmatrix} \)</p>
39 <p>\(R_x \cdot P = \begin{bmatrix} 0 &amp; 1 \\ -1 &amp; 0 \\ 2 &amp; 1 \end{bmatrix} \) \(= \begin{bmatrix} 0 \cdot 1 + (-1) \cdot 2 &amp; 1 \cdot 1 + 0 \cdot 2 \end{bmatrix} \) \(= \begin{bmatrix} -2 &amp; 1 \end{bmatrix} \)</p>
40 <p>So, after reflection, the point \(P(1, 2)\) becomes \(P′(1, -2) \)</p>
40 <p>So, after reflection, the point \(P(1, 2)\) becomes \(P′(1, -2) \)</p>
41 <p><strong>Shear Matrix</strong></p>
41 <p><strong>Shear Matrix</strong></p>
42 <p>A shear transformation is a type of transformation that slants the shape of an object along the coordinate axes. To skew objects in a coordinate system, we use a shear transformation, which is represented by a shear matrix. The shear transformation is classified into two types based on the axis of coordinates: X-Shear and Y-Shear. </p>
42 <p>A shear transformation is a type of transformation that slants the shape of an object along the coordinate axes. To skew objects in a coordinate system, we use a shear transformation, which is represented by a shear matrix. The shear transformation is classified into two types based on the axis of coordinates: X-Shear and Y-Shear. </p>
43 <p><strong>X-Shear(Xsh):</strong>The x-coordinates of the points are shifted while the y-coordinates remain unchanged. It can be represented as: </p>
43 <p><strong>X-Shear(Xsh):</strong>The x-coordinates of the points are shifted while the y-coordinates remain unchanged. It can be represented as: </p>
44 <p>\(X-Shear=[1kx01]\text{X-Shear} = \begin{bmatrix}1 &amp; k_x \\ 0 &amp; 1\end{bmatrix} \)</p>
44 <p>\(X-Shear=[1kx01]\text{X-Shear} = \begin{bmatrix}1 &amp; k_x \\ 0 &amp; 1\end{bmatrix} \)</p>
45 <p><strong>Affine Transformation Matrix</strong></p>
45 <p><strong>Affine Transformation Matrix</strong></p>
46 <p>It is a type of geometric transformation that keeps the straightness and parallelism between lines. Commonly used in computer software and graphic design to move, scale, or rotate shapes.</p>
46 <p>It is a type of geometric transformation that keeps the straightness and parallelism between lines. Commonly used in computer software and graphic design to move, scale, or rotate shapes.</p>
47 <p>We use homogeneous coordinates in affine transformation with matrices. So, let’s see how to express affine transformations using matrix<a>multiplication</a>. Representing the vector (x, y) as a 3-vector (x, y, 1). Using matrix multiplication, we can represent all transformations. </p>
47 <p>We use homogeneous coordinates in affine transformation with matrices. So, let’s see how to express affine transformations using matrix<a>multiplication</a>. Representing the vector (x, y) as a 3-vector (x, y, 1). Using matrix multiplication, we can represent all transformations. </p>
48 <p>In matrix form, a translation that shifts a point by tx and ty along the x-axis and y-axis, respectively, can be represented as:</p>
48 <p>In matrix form, a translation that shifts a point by tx and ty along the x-axis and y-axis, respectively, can be represented as:</p>
49 <p>\( [10tx01ty001]\begin{bmatrix}1 &amp; 0 &amp; t_x \\ 0 &amp; 1 &amp; t_y \\ 0 &amp; 0 &amp; 1\end{bmatrix} \)</p>
49 <p>\( [10tx01ty001]\begin{bmatrix}1 &amp; 0 &amp; t_x \\ 0 &amp; 1 &amp; t_y \\ 0 &amp; 0 &amp; 1\end{bmatrix} \)</p>
50 <p>Thus, \(x′ = x + tx \) \(y′ = y + ty \) </p>
50 <p>Thus, \(x′ = x + tx \) \(y′ = y + ty \) </p>
51  
51