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’).
Scaling: To change the size of an
object, scaling transformation is used. In the scaling process, you either
expand or compress the dimensions of the object. Scaling can be achieved by
multiplying the original coordinates of the object with the scaling factor to
get the desired result.
Let us assume that the original
coordinates are (X, Y), the scaling factors are (SX, SY),
and the produced coordinates are (X’, Y’). This can be mathematically
represented as shown below −
X'
= X . SX and Y' = Y . SY

No comments:
Post a Comment
Thank you