lesson

Updated 1 month ago Β· 5 views
When you slide a character across a 2D video game screen, how does the computer know where every pixel should land?
It uses coordinate math to shift every single point by the exact same distance and in the exact same direction.
Coordinate Mapping Rules
A translation is a rigid transformation that slides every point of a figure along a straight path without changing its size, shape, or orientation.
We represent this movement algebraically using a coordinate mapping rule: (x,y)β(x+a,y+b).
πInteractive diagram
The value a controls the horizontal shift (positive moves right, negative moves left), while b controls the vertical shift (positive moves up, negative moves down).
Is there a more compact way to write this shift without writing out (x,y) every time?
Vector Notation
A vector is a mathematical quantity with both a magnitude (length) and a direction, written in component form as v=β¨a,bβ©.
In component form β¨a,bβ©, the first number a tells you the horizontal change Ξx, and the second number b tells you the vertical change Ξy.
πInteractive diagram
How do we apply these rules when moving an entire geometric shape instead of just one point?