liveBook · Manning

Translation

As explained in Geometry for Programmers

A translation is a geometric transformation that shifts every point by the same distance in the same direction.

A translation moves every point the same distance in the same direction. Although you may apply it to a square or another model, the transformation defines a rule for the whole space, such as ℝ² or ℝ³. section 2.4.2 section 4.1

Represent a two-dimensional translation with one displacement coefficient per axis:

  • xₜ = xᵢ + dₓ and yₜ = yᵢ + dᵧ. The input coordinates are xᵢ and yᵢ; the translated coordinates are xₜ and yₜ. section 4.1.1
  • Interpret dₓ as movement along the x-axis and dᵧ as movement along the y-axis. Substituting numbers produces a specific translation. section 4.1.1
  • Apply the same displacement to every point of a model to translate the entire shape without changing the rule for space. section 9.1 section 2.4.2

A moving square

For a time-dependent translation, replace the fixed coefficients with functions: xₜ = xᵢ + sin(t) and yₜ = yᵢ + cos(t). Increasing t makes the square travel around its original center. This parametric transformation provides a direct geometric model for animation. section 4.1.1

Translation also has a vector interpretation: add the same vector to every point vector in a geometric model. Translation, rotation, scaling, and shear can later be generalized as projective transformations and represented through matrix multiplication. section 9.1 section 4.7

Figure 4.1 Three examples of standard square translations. A standard 1 × 1 square (transparent) moves and becomes the opaque square according to the coefficients.
04-01

Compare three standard translations of a unit square and see how different displacement coefficients relocate the same shape. section 4.1.1

Figure 4.2 An example of parametric translation. A square goes around its original center.
04-02

Observe how replacing fixed coefficients with sin(t) and cos(t) makes a square follow a circular path. section 4.1.1

How Geometry for Programmers covers it

How deep it goes
Explains coordinate equations, vector addition, and parametric motion, while deferring matrix generalization to broader transformation treatment.
Examples
Uses translated unit squares, a time-dependent circular path, and point-vector models as concrete examples.
What it assumes
Assumes familiarity with points, coordinates, and vectors while distinguishing vectors from points through geometric modeling.
What you can do after
Apply coordinate formulas or vector addition to translate points, models, and time-dependent shapes.
How it connects
Connects translation with vector addition, geometric transformations, parametric transformations, projective transformations, and animation.

Also explained in

Compare how 3 books explain translation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.