Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
2D computer graphics
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Translation===<!-- This section is linked from [[affine transformation]]. --> Since a translation is an [[affine transformation]] but not a [[linear transformation]], [[homogeneous coordinates]] are normally used to represent the translation operator by a [[matrix (mathematics)|matrix]] and thus to make it linear. Thus we write the 3-dimensional vector '''w''' = (''w''<sub>''x''</sub>, ''w''<sub>''y''</sub>, ''w''<sub>''z''</sub>) using 4 homogeneous coordinates as '''w''' = (''w''<sub>''x''</sub>, ''w''<sub>''y''</sub>, ''w''<sub>''z''</sub>, 1).<ref>Richard Paul, 1981, [https://books.google.com/books?id=UzZ3LAYqvRkC Robot manipulators: mathematics, programming, and control : the computer control of robot manipulators], MIT Press, Cambridge, MA</ref> To translate an object by a [[vector (geometry)|vector]] '''v''', each homogeneous vector '''p''' (written in homogeneous coordinates) would need to be multiplied by this '''translation matrix''': : <math> T_{\mathbf{v}} = \begin{bmatrix} 1 & 0 & 0 & v_x \\ 0 & 1 & 0 & v_y \\ 0 & 0 & 1 & v_z \\ 0 & 0 & 0 & 1 \end{bmatrix} </math> As shown below, the multiplication will give the expected result: : <math> T_{\mathbf{v}} \mathbf{p} = \begin{bmatrix} 1 & 0 & 0 & v_x \\ 0 & 1 & 0 & v_y\\ 0 & 0 & 1 & v_z\\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} p_x \\ p_y \\ p_z \\ 1 \end{bmatrix} = \begin{bmatrix} p_x + v_x \\ p_y + v_y \\ p_z + v_z \\ 1 \end{bmatrix} = \mathbf{p} + \mathbf{v} </math> The inverse of a translation matrix can be obtained by reversing the direction of the vector: : <math> T^{-1}_{\mathbf{v}} = T_{-\mathbf{v}} . \! </math> Similarly, the product of translation matrices is given by adding the vectors: : <math> T_{\mathbf{u}}T_{\mathbf{v}} = T_{\mathbf{u}+\mathbf{v}} . \! </math> Because addition of vectors is [[commutative]], multiplication of translation matrices is therefore also commutative (unlike multiplication of arbitrary matrices).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)