# Blender 3D: Noob to Pro/Coordinate Transformations

## Coordinate Transformations

A transformation is any operation that changes coordinate values in some way. For example, if you pick up an object and move it to a different place in the room without changing its orientation, then the coordinates of each point on the object relative to the room are adjusted by an amount that depends on the distance and direction between the old and new positions. This is called a translation transformation. Object at original location Object translated to new position

Simply turning the object without moving it from its original location is called rotation.

If the object were to get bigger or smaller, that is a scaling transformation. In the real world, only a few objects can be scaled in this way. For example, a balloon can be inflated or deflated to a larger or smaller size, but a bowling ball cannot. Regardless of what can and can't be re-sized in the real world, any object can be scaled (re-sized) in the world of computer graphics. Scaling may be uniform, i.e. apply equally in all dimensions, or non-uniform. Object uniformly scaled to 50% of original size Object scaled vertically to 50% of original size

## Linear Transformations

The main types of coordinate transformations we’re concerned with are called linear transformations. Lines that were straight before the transformation remain straight. i.e. they do not become curved. For example, the following diagram illustrates three linear transformations applied to the square in the center: Clockwise from the left, a shear or skew, a scale, and a rotation, plus one non-linear transformation that causes two sides of the box to become curved.

## Multiple Transformations

It is possible to concatenate or compose a series of transformations. The resulting transformation can do many things in one operation — translation, rotation, scaling etc. However, the order of composition of the component transformations becomes important. In general, transformations are not commutative. For example, compare the result of moving our model some distance along the Y axis followed by rotating it about the X axis (If this doesn't make sense, consider that the axes are fixed, they aren't moving with the object. More on that later Global and local coordinates):

versus the result of doing the rotation first:

In some instances, the three forms of transformation may be applied on a single object concurrently. Such a feature exists in Blender and is normally implemented in creating animations. For example, you can decide to pick up the object (first transformation - translation), twist it (second transformation - rotation), and, in a 3D modeling environment, increase the size of the object (third transformation - scaling).

## Inverse Transformations

Often there is a need to find the inverse of a transformation. That is, a transformation that has the opposite effect. For example, a rotation of +45° about the X axis is undone by a rotation of -45° around the same axis.

Inverses have many uses, one of which is to simplify the construction of certain kinds of transformations.

For example, it is easy to construct a rotation transformation about the X, Y or Z-axis of the coordinate system. But what about a rotation of Θ° around an arbitrary axis? This can be made out of the following parts:

• a translation that makes the rotation axis pass through the origin.
• rotations about the Y and/or Z axes, as appropriate, so the rotation axis lies along the X axis.
• a rotation of Θ° about the X axis.
• the inverse of the rotations that aligned the rotation axis with the X axis.
• the inverse of the translation that made the rotation axis pass through the origin.

Most of the transformations we deal with in 3D modelling have an inverse, but not all. See the next section for some that don’t.

## Projections

Most of our display and output devices are not three-dimensional. Thus, three-dimensional images need to be projected onto a two-dimensional surface (like a display screen or a printed page) before we can see them.

There are two main ways to perform such projections. One is orthographic projection, where parallel lines are drawn from all points of the three-dimensional object until they intersect a plane representing the display surface:

The other method is perspective projection, where the lines drawn are not parallel, but intersect at a point representing the location of the eye of the viewer:

Projections are also linear transformations. But since they take a three-dimensional space and flatten it onto a two-dimensional surface, some information is lost. Those transformations are irreversible i.e. they cannot be undone, at least in a unique way as the depth information is gone.

You will read more about both orthographic and perspective views in the following pages.

The mathematics of perspective were first worked out in the 11th century by Alhazen, and used to great effect by the Italian Renaissance painters four hundred years later.