# Blender 3D: Noob to Pro/Coordinate Transformations

## Contents

## Coordinate Transformations[edit]

A *transformation* is any kind of 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.

If you simply turn the object around without moving it from its original location, then that’s called a *rotation*.

If the object were to get bigger or smaller, then that would be called 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 be re-sized. 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* (applying equally in all dimensions) or *non-uniform*.

## Linear Transformations[edit]

The main kinds of coordinate transformations we’re concerned with here are called *linear transformations*. Lines that were straight before the transformation remain straight after; they do not turn into curves. For example, the following diagram illustrates three linear transformations applied to the square in the center: a scaling, a *shear* or *skew* transform, and a rotation, plus one transformation that isn’t linear, because it introduces curves where there were none before.

## Multiple Transformations[edit]

It is possible to *concatenate* or *compose* a series of transformations. The resulting transformation can do a whole bunch of 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 a certain 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, three of the forms of transformation may be applied on a single object concurrently. Such a feature exists in Blender and is normally implemented in creating animations. Therefore, 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[edit]

There is quite commonly a need to find the *inverse* of a transformation—that is, the opposite transformation that undoes its 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[edit]

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:

More on orthographic projections

The other way 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. Which means these are *non-invertible* transformations; they cannot be undone, at least in a unique way—the depth information is gone.

More on perspective projections

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.

--Nkansahrexford (discuss • contribs) 01:15, 11 February 2012 (UTC)Nkansahrexford