Page 7: More Transformations
Spring 2026 Sample Solution
First, a bit of terminology…
I’ve been using the term transformation for the noun describing the thing that transforms points. Notice that I used the verb transform for what a transformation does. We don’t use transformation as a verb; we use transform.
Sometimes, we use transform as a noun. It’s fewer characters to type or syllables to say. The terms are somewhat equivalent - I won’t be picky about the difference. Often transformation refers to the mathematical or conceptual operation, while transform (as a noun) refers to a specific operation.
With that behind us, let’s explore some other transformations.
A Gallery of Basic Transformations
There are a few types of transformations that we consider “basic”. They have a common mathematical representation that we will describe later. I want to introduce them visually before we start talking about them mathematically.
We’ve already seen translation.
And we’ve also discussed uniform and non-uniform scales.
Rotation is another important transformation in this same category. It is a “rigid” transformation in that it preserves the size and shape of objects; specifically, the distances between any two points are preserved. Like scaling, it also has a center (called the center of rotation) that is the only point not changed by the transformation. We’ll discuss rotations a lot more over the rest of the workbook.
The last of the basic transformations we’ll introduce is shear. Shear slides points along the X direction by some amount determined by its position in Y. The new x position is where s is the shear factor. Notice that for the X axis (Y=0), the points don’t move. Horizontal shear does not change the y value.
There are two versions of shear. The one along the X axis we just described, and a corresponding one along the Y axis.
Combining Basic Types
Some combinations of basic transformations are common, and get their own names.
A rigid transformation is one that preserves the size and shape of an object. Rotations and translations are examples. Any combination of rotations and translations are rigid. Mathematically, rigidity preserves the distance between points. If you have two points, the distance between them is preserved before and after transformation. Because distances are preserved, angles are also preserved.
A similarity transformation preserves the shape, but not the size of objects. It allows for translation, rotation, and uniform scale. Angles are preserved, but distances are not.
All of the types of transformations so far on this page (and all combinations of them) are examples of affine transformations. Affine transformations are easier to define in terms of their mathematics (which we will do later). Affine transformations are a very important category of transformations in computer graphics. We’ll discuss them more after we explain the math.
Affine transformations have the property that they preserve parallel lines. So if two lines start out parallel, they will remain parallel after transformation. So, for example, a rectangle (the square in the example) can be transformed into a parallelogram, but the sides will always remain parallel.
Linear Transformations
I have avoided describing transformations as linear. In part because it refers to the mathematics of the transformations (that we haven’t discussed yet). But also, in part, it is ambiguous because it can refer to several different things.
The common definition of a linear transformation is one that can be implemented by matrix multiplication in the current dimensions. We haven’t discussed using matrices yet. Because any matrix times zero is zero, linear transformations cannot change the origin. Therefore, translation is not a linear transformation in 2D. This is why we need affine transformations: they combine linear transformations and translation - an important combination!
However, later in the workbook we’ll see that translation can be viewed as a linear operation in “homogeneous coordinates”. We’ll explain this later. But it means that translation (or any affine transformation) can be viewed as a linear transformation in this other space.
The set of all transformations that are linear in this more complicated space is sometimes called “projective transformations” or “homogeneous transformations”. They include affine transformations, and many others.
Here is a demo. Notice that the rectangle of the points can be shaped into any quadrilateral; unlike affine transformations that preserve parallelism. If you play with this demo, you will notice that sometimes the grid gets weird. The transformation may have discontinuities (where things go off to infinity and back). This makes drawing the grid hard (so sometimes portions of the grid can’t be seen).
As weird as this transformation seems, it does map lines to lines. The line might go off to infinity and wrap around to negative infinity, but it will still be a straight line. We’ll explain more later in the workbook.
Non-Linear Transformations
A non-linear transformation might just be one that is not linear. But, as we just saw, that can be ambiguous.
Generally, we use the term “non-linear” to imply that it does not map lines to lines. Here is an example of a simple non-linear transformation:
In this workbook, we won’t look at non-linear transformations (other than this one, and the grid warp on the first page). We’ll come back to them later in the course.
Next: Page 8 - TransformToy