@EdCat Every affine transformation is a linear transformation in one dimension higher (via homogeneous coordinates). This leads to a compact representation of affine transformations in 3D where one can simply keep track of a product of matrices to concatenate spatial transformations. (Otherwise, youâ€™d have to store a long list of matrix/vector pairs...)

What is the magic trick?

@EdCat Every affine transformation is a linear transformation in one dimension higher (via homogeneous coordinates). This leads to a compact representation of affine transformations in 3D where one can simply keep track of a product of matrices to concatenate spatial transformations. (Otherwise, youâ€™d have to store a long list of matrix/vector pairs...)