Select Page

Homogenous Coordinates in Computer Graphics

The orbit of a point, a line graph or the whole picture on the computer, a point besides the origin, is accomplished by first shifting the picture till the origin, is occupied by the point of the rotational axis, then rotating the picture and then beginning to move the picture to its initial position.

A translation is termed as moving a picture from one position to another in a horizontal path. A translation can be performed by adding or subtracting the portion by which the image needs to be moved to each point.

With the help of a precise matrix program, the translation of point through coordinate shift cannot be integrated with other transformations. Such integration is necessary if we want to rotate a picture by translating about a point apart from the origin, rotation again translation.

Homogeneous coordinates help you to integrate all three transformations into a common transformation. 2D coordinate positions (x, y) are determined by three-way coordinates in a homogeneous coordinate system.

In design and development implementations, homogeneous coordinates are commonly used. We conduct translation, scaling and rotation to align the image into the correct position.

Instances of expressing coordinates in a homogeneous coordinate system

We can select homogeneous parameters h for every non-negative value for 2D geometric transformation. Consider it like one for our comfort. With homogeneous coordinates (x, y, 1), each 2D location is represented.

Here, we have the following matrix for 2D transformation in homogenous coordinate system.

• Matrix for Translation

1    0    0                 1    0    tx

0    1    0       or      0    1    ty

tx     tx     1                 0     0     1

• Matrix for Scaling

Sx    0    0

0   Sy    0

0   0     1

• Matrix for Reflection(x-axis)

1    0    0

0   -1    0

0    0    1

• Matrix for Reflection(y-axis)

-1    0    0

0    1   0

0    0   1

• Matrix for Reflection(Origin)

-1    0    0

0   -1    0

0    0    1

• Matrix for Reflection(when line Y = -X)

0    -1    0

-1     0    0

0     0    1

• Matrix for Reflection(when line Y=X)

0    1    0

1    0    0

0    0    1

• Matrix for Rotation(when clockwise)

cos        -sin         0

sin        cos      0

0              0            1

• Matrix for Rotation(when anti-clockwise)

cos         sin         0

–sin        cos      0

0              0            1

• Matrix for Shearing (X direction)

1        0        0

Shx       1        0

0        0        1

• Matrix for Shearing (Y direction)

1       Shy      0

0            1         0

0       0          1

• Matrix for Shearing (X and Y direction)

1        Shy      0

Shx        1          0

0        0          1