Why do we use matrices for transformations?
We can use matrices to translate our figure, if we want to translate the figure x+3 and y+2 we simply add 3 to each x-coordinate and 2 to each y-coordinate. If we want to dilate a figure we simply multiply each x- and y-coordinate with the scale factor we want to dilate with.
How does glm rotate work?
The glm::rotate function multiplies this matrix by a rotation transformation of 180 degrees around the Z axis. Remember that since the screen lies in the XY plane, the Z axis is the axis you want to rotate points around.
How does transform matrix work?
When we apply a 2D transform, the browser multiplies the matrix by a vector: [x, y, 1] . The values of x and y are the coordinates of a particular point within the local coordinate space. To determine the transformed coordinates, we multiply each entity in each row of the matrix by its corresponding row in the vector.
How are matrices used in animation?
In video gaming industry, matrices are major mathematic tools to construct and manipulate a realistic animation of a polygonal figure. Examples of matrix operations include translations, rotations, and scaling. Other matrix transformation concepts like field of view, rendering, color transformation and projection.
Why do we use 4×4 matrices in math?
To succinctly answer the “why” question, it’s because a 4×4 matrix can describe rotation, translation, and scaling operations all at once. Being able to describe any of these in a consistent manner simplifies a lot of things. Different kinds of transformations can be more simply represented with a different mathematical operations.
Why do we use matrices to transform things in 3D?
Yes, you can add a vector in the case of translation. The reason to use a matrix boils down to having a uniform way to handle different combined transformations.
Why do we use a 4×4 matrix for homogeneous coordinates?
the reason to use a 4×4 matrix is so that the operation is a linear transformation. this is an example of homogeneous coordinates. The same thing is done in the 2d case (using a 3×3 matrix). The reason for using homogeneous coordinates is so that all 3 geometric tansformations can be done using one operation;
Why are 3D translations not possible with 3×3 matrices?
A simple argument why 3D translations are not possible with 3×3 matrices is that translation can take the origin vector: away from the origin, say to x = 1: But that would require a matrix such that: But that is impossible.