3D Translation

Among the basic geometric transformations used in computer graphics translation, rotation, and scaling translation is the simplest, yet it forms the foundation for understanding more complex transformations like rotation about an arbitrary point or scaling about a fixed pivot.

What is Translation?

Translation is a transformation that repositions an object in space by moving every point of the object the same distance in the same direction, without altering its size, shape, or orientation. Think of sliding a rigid object across a table — every point on the object shifts by the same amount.

In 3D space, a translation is defined by three displacement values:

  • tx — displacement along the X-axis
  • ty — displacement along the Y-axis
  • tz — displacement along the Z-axis

Together, (tx, ty, tz) is called the translation vector.


Mathematical Definition

If a point in 3D space is P(x, y, z), after translation by (tx, ty, tz), the new point P'(x', y', z') is given by:

x' = x + tx
y' = y + ty
z' = z + tz

This can be written compactly in vector form:

P' = P + T

where T = (tx, ty, tz) is the translation vector.


Why Homogeneous Coordinates?

Translation is fundamentally an additive operation, while rotation and scaling are multiplicative operations (they involve multiplying coordinates by matrix entries). This creates a problem: with ordinary 3×3 matrices, translation cannot be represented as a matrix multiplication — it can only be represented as vector addition. This makes it impossible to combine translation with rotation/scaling into a single matrix multiplication.

To solve this, computer graphics uses homogeneous coordinates: every 3D point (x, y, z) is represented as a 4D point (x, y, z, 1) by appending an extra coordinate, usually called w, set to 1 for points. This allows translation to also be expressed as a matrix multiplication, using a 4×4 matrix:

| x' |   | 1  0  0  tx | | x |
| y' | = | 0  1  0  ty | | y |
| z' |   | 0  0  1  tz | | z |
| 1  |   | 0  0  0  1  | | 1 |

Expanding this matrix multiplication confirms it reproduces the original equations:

x' = (1)(x) + (0)(y) + (0)(z) + (tx)(1) = x + tx
y' = (0)(x) + (1)(y) + (0)(z) + (ty)(1) = y + ty
z' = (0)(x) + (0)(y) + (1)(z) + (tz)(1) = z + tz

So the 3D translation matrix is:

T(tx, ty, tz) = | 1  0  0  tx |
                | 0  1  0  ty |
                | 0  0  1  tz |
                | 0  0  0  1  |

Geometric Interpretation

Translation does not rotate, scale, reflect, or shear an object — it purely changes the object's position in space. Geometrically:

  • Lines remain parallel to their original direction.
  • Distances between any two points on the object remain unchanged.
  • Angles within the object remain unchanged.

Because of this, translation belongs to a class of transformations called rigid-body transformations (also called isometries) — transformations that preserve distances and angles.


Properties of 3D Translation

  1. Identity case: If tx = ty = tz = 0, the translation matrix becomes the identity matrix, and the object remains unmoved.
  2. Inverse translation: The inverse of a translation T(tx, ty, tz) is simply a translation in the opposite direction:

    T^-1(tx, ty, tz) = T(-tx, -ty, -tz)

    This makes sense — to undo a move, move back by the same amount in the opposite direction.

  3. Composition (combining two translations): Applying two translations in sequence is equivalent to a single translation by the sum of the vectors:

    T(tx1, ty1, tz1) · T(tx2, ty2, tz2) = T(tx1+tx2, ty1+ty2, tz1+tz2)
  4. Commutativity: Unlike rotation, translations commute with each other — the order in which you apply multiple translations does not matter:

    T(a) · T(b) = T(b) · T(a)
  5. Does not commute with rotation/scaling in general: If translation is combined with rotation or scaling, the order does matter. For example, translating an object away from the origin and then rotating it produces a different result than rotating first and then translating (the first causes the object to "orbit" around the origin, while the second rotates it in place and then moves it).
  6. Determinant: The translation matrix has determinant 1, meaning it preserves volume — consistent with it being a rigid-body transformation.

Translation in Practice

In real graphics pipelines (e.g., OpenGL, DirectX, game engines), translation is one part of the Model Matrix, which positions an object within world space. A typical sequence is:

Model Matrix = T (Position) · R (Orientation) · S (Size)

Here translation is applied last (in terms of matrix order, it is leftmost so that it's the last operation acting on the result of scale and rotate), ensuring the object is scaled and rotated about its own local origin before being placed at its final world position.


Solved Numerical Problems

Problem 1

A point P(2, 3, 4) is translated using the translation vector (5, -2, 3). Find the new coordinates of the point.

Solution:

x' = x + tx = 2 + 5 = 7
y' = y + ty = 3 + (-2) = 1
z' = z + tz = 4 + 3 = 7

New point P' = (7, 1, 7)


Problem 2

Find the translation matrix for moving an object by 4 units along X, -3 units along Y, and 6 units along Z. Then use it to translate the point (1, 1, 1).

Solution:

Translation matrix:

T(4, -3, 6) = | 1  0  0   4 |
              | 0  1  0  -3 |
              | 0  0  1   6 |
              | 0  0  0   1 |

Applying to point (1, 1, 1, 1):

x' = 1(1) + 0(1) + 0(1) + 4(1) = 5
y' = 0(1) + 1(1) + 0(1) - 3(1) = -2
z' = 0(1) + 0(1) + 1(1) + 6(1) = 7

New point P' = (5, -2, 7)


Problem 3

A cube has a vertex at A(0, 0, 0) and an opposite vertex at B(2, 2, 2). The cube is translated by vector (3, 4, -1). Find the new positions of A and B, and verify the edge length (diagonal) is unchanged.

Solution:

Original diagonal length:

AB = √[(2-0)² + (2-0)² + (2-0)²] = √(4+4+4) = √12 ≈ 3.464

Translated points:

A' = (0+3, 0+4, 0-1) = (3, 4, -1)
B' = (2+3, 2+4, 2-1) = (5, 6, 1)

New diagonal length:

A'B' = √[(5-3)² + (6-4)² + (1-(-1))²] = √(4+4+4) = √12 ≈ 3.464

The distance is unchanged (3.464 units), confirming translation is a rigid-body transformation.


Problem 4

A point P(1, 2, 3) is first translated by (2, 0, 1) and then translated again by (-1, 3, 2). Find the final position, and verify it matches a single combined translation.

Solution:

Step 1: Apply T1(2, 0, 1):

P1 = (1+2, 2+0, 3+1) = (3, 2, 4)

Step 2: Apply T2(-1, 3, 2):

P2 = (3-1, 2+3, 4+2) = (2, 5, 6)

Combined translation vector: (2+(-1), 0+3, 1+2) = (1, 3, 3)

Verification: P + combined vector = (1+1, 2+3, 3+3) = (2, 5, 6) ✓ Matches.


Problem 5 (Practice — try it yourself)

A triangle has vertices A(1, 0, 0), B(0, 1, 0), and C(0, 0, 1). Translate the triangle by the vector (2, 2, 2). Find the new coordinates of A, B, and C, and verify that the side length AB remains unchanged after translation.

(Hint: original AB = √2; after translating both points by the same vector, recompute the distance between the new A' and B'.)

Conclusion

3D translation is conceptually simple but mathematically essential: it teaches the use of homogeneous coordinates, which become indispensable once rotation and scaling are introduced. Mastering translation — its matrix form, properties, and composition rules — is the first step toward understanding the full 3D transformation pipeline used in every modern graphics engine.

Next Post
3D Rotation
0 people found this article helpful

Was this article helpful?