¿Por qué estamos transformando vectores 3D con matrices 4x4?

¿Por qué no una matriz de 3x3? ¿Por qué todo está organizado en una matriz de 4x4 exactamente así? ¿Por qué la última línea está llena de ceros y uno al final? Hice estas preguntas el día anterior, decidí investigar la pregunta y contar lo que descubrí.





En el artículo, solo nos interesarán las transformaciones afines y, en particular, la rotación, el escalado y el movimiento, que se utilizan activamente en la programación gráfica y el desarrollo de juegos en general.





: . , , , (A⋅x). , , , (+b).





T, x





T (\ vec {x}) = A \ vec {x} + \ vec {b}

, b x . x x', :





\ begin {array} {ll} A \ rightarrow [a] \ rightarrow a, \\ \ vec {b} \ rightarrow (b) \ rightarrow b, \\ \ vec {x} \ rightarrow x, \\ T (x ) \ rightarrow x '\ end {matriz}





x '= ax + b

x ( ), b ( ).





, , . M, :





x '= ax + b = M (x)

x' = 3x + 4 (3x +4 ) .





\ begin {matriz} {ll} Mx = 3x + 4 \\ M = (3x + 4) / x \\ M = 3 + (\ frac {4} {x}) \ end {matriz}

, ( 3x [3]), (x+4) , M x.





:

+4 +4y, y, x ,





x '= 3x + 4y \\ y' = \ _x + \ _y

2x2, x' = 3x+4 x, . . , .





\ begin {bmatrix} x '\\ y' \ end {bmatrix} = \ begin {bmatrix} 3 & 4 \\ \ _ & \ _ \ end {bmatrix} \ begin {bmatrix} x \\ y \ end {bmatrix }

2x2 , , - y, +4y , +4, x :





\ begin {bmatrix} x '\\ y' \ end {bmatrix} = \ begin {bmatrix} 3 & 4 \\ \ _ & \ _ \ end {bmatrix} \ begin {bmatrix} x \\ 1 \ end {bmatrix } \ rightarrow \ begin {array} {l} x '= 3 \ cdot x + 4 \ cdot 1 \\ y' = \ _ \ cdot x + \ _ \ cdot 1 \ end {array}

, , , , 3x+4 x' - y' y' ,





\ begin {bmatrix} x '\\ 1 \ end {bmatrix}

. : y' = 1 = 0 ⋅ x + 1 ⋅ 1





\ begin {bmatrix} x '\\ 1 \ end {bmatrix} = \ begin {bmatrix} 3 & 4 \\ 0 & 1 \ end {bmatrix} \ begin {bmatrix} x \\ 1 \ end {bmatrix}

, x , .





\ begin {bmatrix} a & b \\ 0 & 1 \ end {bmatrix}

(a), (b) (0 1) y' 1, x' , .





- , , . ():





\ begin {bmatrix} 3 & 4 \\ 0 & 1 \ end {bmatrix} \ begin {bmatrix} 1 \\ 1 \ end {bmatrix} = \ begin {bmatrix} 7 \\ 1 \ end {bmatrix}

,





, , - z, y .





22 . b .





x' y' , , z' 1 .





, () , () :





:





  • Computing 2D affine transformations using only matrix multiplication





  • Brilliant. Linear Transformations





  • Explaining Homogeneous Coordinates & Projective Geometry





  • Nonlinear Transformation





  • Can non-linear transformations be represented as Transformation Matrices?





  • Linear transformations and matrices | Essence of linear algebra, chapter 3












All Articles