Homogeneous coordinates

From Robotics
Revision as of 16:05, 12 June 2014 by Nickchen (talk | contribs)

Jump to: navigation, search
← Back: Rotation Overview: Transformations Next: Combinations of the three transformation types

Rotation and scaling of n-dimensional coordinates can be described by n-by-n matrices. Conveniently consider two dimendions, so n=2. Each of the 4 components of the matrix is multiplied by one of the two coordinates of the vector:


\left[\begin{array}{c}
x_1\\
y_1
\end{array}\right]=
\mathbf{T}\cdot
\left[\begin{array}{c}
x_0\\
y_0
\end{array}\right]=
\left[\begin{array}{cc}
t_{11} & t_{12}\\
t_{21} & t_{22}
\end{array}\right]
\cdot
\left[\begin{array}{c}
x_0\\
y_0
\end{array}\right]=
\left[\begin{array}{cc}
t_{11}\cdot x_0+t_{12}\cdot y_0\\
t_{21}\cdot x_0+t_{22}\cdot y_0
\end{array}\right]

The same holds for higher dimensions. All the components of the matrix are multiplied with one of the vectors n components. So the transformations are 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. If the actual space is n-dimensional, the transformation matrix is an (n+1)-by-(n+1) matrix. The last row (with index n+1) always contains zeros and a 1 at the end. 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.