Basic Transforms

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').

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e484e74f-c2c4-48f8-8fc6-e0c776c7a6ea/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/87949014-e829-4286-9ad6-c830bc4a31e2/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/043f0bc9-5e14-4e1e-892d-58aca03d41aa/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b14fe4c8-7ba2-4a28-a486-2d417d9ad06d/Untitled.png

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  and  axes of the coordinate frame!

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.

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 .

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.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e997b877-44fd-423e-9599-1af0a5743c77/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/15f3da07-578d-4a00-a2f2-fc31f40858f0/Untitled.png

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.

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 –

  1. The inverse transform simply involves taking the inverse of a given matrix, and applying it to an image.