In this note, we're going to explore transformations. To begin, let's take a look at a few basic transforms. Transforms can be thought of functions acting on points: given some point (x, y)
, we can apply a transformation F(x, y)
to acquire some (x', y')
.
Why do we study transforms? Transforms can be used to describe the position of different instances of an object (to model a robot army, for example). We can also describe the relative position of connected body parts (e.g. arm, shoulder) using transforms. Transforms are fundamental to both modeling and viewing.
Modeling
Viewing
We can represent linear transforms as matrices. Different matrices exist to apply a variety of transforms, including stretching, squeezing, rotation, shearing, reflection, and projection.
We can interpret the columns of the transformation matrix as the x
and y
axes of the coordinate frame!
Each column resembles a new coordinate axis.
How do we deal with translation? If we want to encapsulate all possible transformations through a single matrix multiplication operation, we need to add a third coordinate ("bias", or "w-coordinate") to our coordinate system!
Here, we've captured the translation of shifting the image up & right by (tx, ty)
.
Affine transformations on the 2D plane can be performed by linear transformations in three dimensions. Translation is done by shearing along over the z axis, and rotation is performed around the z axis.
Now that we know how to handle translation, we can write our three fundamental transformations (scale, rotation, transform) as matrices.
Notice how rotation & translation are rigid transforms - the actual shape of the object doesn't change. Scaling is a similarity transform.
A couple of notes about transforms –