Article Directory
1. Two-dimensional transformation
Linear transformation and matrix :
linear transformation = matrix (matrix with the same dimensions as the vector)
Scaling : Uniform scaling and non-uniform scaling
Symmetry (Reflection) : x becomes -x, y does not change.
Shear : Just like dragging the image in the horizontal direction, there is no change at the position of y=0 in the horizontal direction, and it changes to a at the position of y=1 in the horizontal direction. The movement of any point in the horizontal direction is a*y, and there is no change in the vertical direction.
Rotate : Generally speaking, the default rotation is to rotate around the origin of the coordinate, and the counterclockwise direction is the positive direction. The derivation process is to obtain the transformation matrix through two special points (1,0), (0,1).
Translate : Translate is special and cannot be expressed in matrix form and is not a linear transformation. But we don't want the translation transformation to be special, so we introduce homogeneous coordinates to solve the problem.
2. Homogeneous Coordinates
Homogeneous Coordinates : Add the third coordinate (w coordinate), and the following matrix will become the above form. Since the vector does not consider the absolute position (translation invariance), adding the third coordinate is 0 to ensure the same after the change and before the change.
Affine Transformations : Affine map = linear mapping + displacement. All affine transformations can be transformed into homogeneous coordinate transformations. Only when representing the mode transformation in two-dimensional coordinates, the last line is 0 0 1.
The unified form of transformation : the homogeneous coordinate form can be used to represent all transformations.
Inverse Transform : Reverse the operation of a transform is an inverse transform, which is mathematically multiplied by the inverse matrix of the transform matrix.
Composite Transform : The transformation order of the composite matrix is very important. For the composite transformation, different results will usually be obtained after the transformation order is changed. That is, for combinatorial transformation, the commutative law is not satisfied. Note that for the combination transformation formula, the calculation is from right to left.
2. 3D Transforms (Preview)
3D Transforms : Use homogeneous coordinates again, and use 4 parameters to represent the 3D transformation. In other words, (x, y, z, w) (w != 0) is used to represent points (x/w, y/w, z/w) in three-dimensional space.
Three-dimensional affine transformation : A 4 X 4 matrix is used to represent the three-dimensional affine transformation, the last row is 0 0 0 1, the first three numbers in the last column are displacements, and abcdefghi is a linear transformation in three-dimensional space.
The end of the course
Does it mean translation or linear transformation first?
It should be linear transformation first and then translation.