Definition

  • An affine transformation is a way to move and change shapes in a space while keeping the basic layout of the shape the same.
  • Basically it keeps lines straight, maintains the proportions between points, and ensures that parallel lines remain parallel.
  • Can be represented by a matrix and a vector translation.
TransformationDescription
TranslationSliding the shape to a new spot.
ScalingStretching or squeezing the shape bigger or smaller.
RotationSpinning the shape around a point.
ReflectionFlipping the shape over as if in a mirror.
ShearingSlanting the shape, like turning a square into a parallelogram.
Example:
  • Here, represents the new position and shape of your square (now a rectangle) after you’ve slid, spun, and stretched it. is the instruction for how to spin and stretch, and 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 dimensions to .
  • 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:
Example of a 3D Affine Transformation:
  • In 3D space, the distinction between points and vectors is marked by the fourth coordinate, W.
    • Set to 1 for points () to enable spatial movements.
    • And 0 for vectors (), representing direction and magnitude without a fixed location.
  • The , or the matrix part, facilitates rotation, scaling, reflection, and shearing, altering the object’s shape or orientation without changing its position.
  • The , or the vector part, are responsible for translation, moving the object along the () axes and directly affecting its position in space.
  • The in the matrix’s bottom row and rightmost column introduce the extra dimension W, which ensures transformations apply correctly by integrating translation and shape modification within the same operation.