Slanting the shape, like turning a square into a parallelogram.
Example:
T(x)=Ax+b.
Here, T(x) represents the new position and shape of your square (now a rectangle) after you’ve slid, spun, and stretched it. A is the instruction for how to spin and stretch, and x is the instruction for how to slide it across the table.
Homogenous Coordinates
To adapt shapes for 3D transformations, we introduce an extra dimension to each point’s representation, moving from n dimensions to n+1.
This enables us to transform objects by adding depth, turning flat images (2D) into shapes with volume (3D). Through matrix multiplication, we can modify an object’s placement, scale, and orientation within a scene.
Example of a 2D Affine Transformation:
ac0bd0txty1
Example of a 3D Affine Transformation:
adg0beh0cfi0txtytz1
In 3D space, the distinction between points and vectors is marked by the fourth coordinate, W.
Set to 1 for points (x,y,z,1) to enable spatial movements.
And 0 for vectors (x,y,z,0), representing direction and magnitude without a fixed location.
The yellow elements, or the matrix part, facilitates rotation, scaling, reflection, and shearing, altering the object’s shape or orientation without changing its position.
The red elements, or the vector part, are responsible for translation, moving the object along the (x,y,z) axes and directly affecting its position in space.