Vector v is scaled by the unit vector N, and K is the scaled vector of the scaling factor:
S (n,k) = v + (k-1) (v N) n
Scale matrix
You can tell by the formula above (Nx, NY is the x and y components of vector N)
s ([1 0], k) = [1 + (K-1) nx² (k-1) Nxny]
S ([0 1], k) = [(k-1) Nxny 1+ (k-1) ny²]
So
1 + (k-1) nx² (k-1) nxny
(k-1) Nxny 1+ (k-1) ny²
3D Scaling Matrix
1 + (k-1) nx² (k-1) nxny (k-1) Nxnz
(k-1) Nxny 1+ (k-1) ny² (k-1) nynz
(k-1) Nxnz (k-1) Nzny 1+ (k-1) nz²
Image: You can imagine a thin piece of paper, a picture on the front, no painting on the back, and a reverse view of the image from behind.
The image can be implemented by scaling factor k =-.
Orthographic projection: You can do this by using the scale factor k = 0,n as the vertical unit vector of the plane to be projected.
Shear: The product of a coordinate system is added to another coordinate system
Hx = 1 0
S 1