CGMM | Translation in 2D Plane | Exp - 7


Translation in 2D Plane

A translation moves an object to a different position on the screen. You can translate a point in 2D by adding translation coordinate (tx, ty) to the original coordinate (X, Y) to get the new coordinate (X’, Y’).
From the above figure, you can write that −
X’ = X + tx
Y’ = Y + ty
The pair (tx, ty) is called the translation vector or shift vector. The above equations can also be represented using the column vectors.
P=[X][Y] p' = [X][Y]T = [tx][ty]
We can write it as −
P’ = P + T

For more info visit tutorialspoint

Problem Statement

A ball is placed wrongly at a point. Change its location from one place to another. Display it pictorial view in 2D plane.

File: Download here

No comments:

Powered by Blogger.