Difference between revisions of "Homogeneous coordinates"

From Robotics
Jump to: navigation, search
Line 11: Line 11:
 
  & & & \\ \hline
 
  & & & \\ \hline
 
0 & 0 & 0 & 1
 
0 & 0 & 0 & 1
\end{array}\right]=
+
\end{array}\right]<!--=
 
\left[\begin{array}{ccc|c}
 
\left[\begin{array}{ccc|c}
 
  &  &  &  \\  
 
  &  &  &  \\  
Line 23: Line 23:
 
  & & & p_z\\ \hline
 
  & & & p_z\\ \hline
 
0 & 0 & 0 & 1
 
0 & 0 & 0 & 1
\end{array}\right]
+
\end{array}\right]-->
 
</math>
 
</math>
  

Revision as of 16:21, 13 June 2014

← Back: Rotation Overview: Transformations Next: Combinations of transformations

Rotation of n-dimensional coordinates can be described by an n-by-n matrix. All the components of the matrix are multiplied with one of the n coordinates. So the transformation is dependent on the original coordinates. Translation however is actually a vector addition and so independent of the original coordinates (see subarticle about translation).

To be able to also apply a translation by matrix multiplication, an additional dimension is introduced. For three-dimensional space (which is usually regarded in robotics), the homogeneous transformation matrix \mathbf{T} is a 4-by-4 matrix. \mathbf{T} consists of the 3-by-3 rotation matrix \mathbf{R} and a 3-by-1 translation vector \vec{\mathbf{p}} combined with the last row of the identity matrix:


\mathbf{T}=
\left[\begin{array}{ccc|c}
 &  &  &  \\ 
 & \mathbf{R} &  & \vec{\mathbf{p}}\\
 & & & \\ \hline
0 & 0 & 0 & 1
\end{array}\right]<!--=
\left[\begin{array}{ccc|c}
 &  &  &  \\ 
\vec{\mathbf{x}} & \vec{\mathbf{y}} & \vec{\mathbf{z}} & \vec{\mathbf{p}}\\
 & & & \\ \hline
0 & 0 & 0 & 1
\end{array}\right]=
\left[\begin{array}{ccc|c}
 &  &  &  p_x\\ 
\vec{\mathbf{x}} & \vec{\mathbf{y}} & \vec{\mathbf{z}} & p_y\\
 & & & p_z\\ \hline
0 & 0 & 0 & 1
\end{array}\right]-->

Let the components of the rotation matrix be denoted as follows:


\mathbf{R}=
\left[\begin{array}{ccc}
r_{11} & r_{12} & r_{13}\\
r_{21} & r_{22} & r_{23}\\
r_{31} & r_{32} & r_{33}
\end{array}\right]

to the standard transformation matrix matrix, where the top left n-by-n submatrix The additional component of vectors is always a 1. So the multiplication for n=2 for example results in:


\left[\begin{array}{c}
x_1\\
y_1\\
1
\end{array}\right]=
\mathbf{T} \cdot
\left[\begin{array}{c}
x_0\\
y_0\\
1
\end{array}\right]=
\left[\begin{array}{ccc}
t_{11} & t_{12} & t_{13}\\
t_{21} & t_{22} & t_{23}\\
0 & 0 & 1
\end{array}\right]
\cdot
\left[\begin{array}{c}
x_0\\
y_0\\
1
\end{array}\right]=
\left[\begin{array}{c}
t_{11}\cdot x_0+t_{12}\cdot y_0+t_{13}\cdot 1\\
t_{21}\cdot x_0+t_{22}\cdot y_0+t_{23}\cdot 1\\
0\cdot x_0+0\cdot y_0+1\cdot1
\end{array}\right]=
\left[\begin{array}{c}
t_{11}\cdot x_0+t_{12}\cdot y_0+{\color{Green}\mathbf{t_{13}}}\\
t_{21}\cdot x_0+t_{22}\cdot y_0+{\color{Green}\mathbf{t_{23}}}\\
1
\end{array}\right]

As can be seen in the resulting vector, the components t_{13} and t_{23} are independent of the original coordinates and just added to the x- or the y-coordinate, respectively.