What is 2D Translation in computer graphics? Explain its mathematical…

What is 2D Translation in computer graphics? Explain its mathematical representation using homogeneous coordinates and calculate the new coordinates of a triangle with vertices A(2, 2), B(6, 2), and C(4, 5) when it is translated by tx = 4 and ty = 3 units.

Show answer & explanation

2D Translation is a geometric transformation that moves an object from one position to another in a 2D plane. It involves shifting every point (x, y) of the object by fixed distances, tx and ty. This process changes only the object's location, keeping its size, shape, and orientation exactly the same.

In computer graphics, we use Homogeneous Coordinates (x, y, 1) to represent translation. While basic translation is an addition process, homogeneous coordinates allow us to express it as a 3 * 3 matrix multiplication. This is crucial because it enables us to combine translation with rotation and scaling into a single "Composite Matrix" for faster processing.

The general translation matrix T is defined as:

image.png

For the given triangle with vertices A(2,2),B(6,2), and C(4,5) and translation factors tx = 4, ty = 3,we calculate the new coordinates P'= T.P:

Point A(2, 2):

image.png

Point B(6, 2):

image.png

Point C(4, 5):

image.png

Final Result: The new coordinates of the translated triangle are A'(6, 5), B'(10, 5), and C'(8, 8).

Explore the full course: Zero To Hero

Loading lesson…