Difference between revisions of "Scaling"
Line 27: | Line 27: | ||
\end{array}\right] | \end{array}\right] | ||
</math> | </math> | ||
− | So the values <math>a</math> and <math>d</math> act as factors for the x- and the y-component of the scaled vector. Several different cases for <math>a</math> and <math>d</math> can be considered, | + | So the values <math>a</math> and <math>d</math> act as factors for the x- and the y-component of the scaled vector. |
+ | |||
+ | Several different cases for <math>a</math> and <math>d</math> can be considered. The following transformation matrices show some of the possible cases, that achieve different scaling results:<br/> | ||
:<table> | :<table> |
Revision as of 16:27, 27 May 2014
← Back: Translation | Overview: Transformations | Next: Rotation → |
Scaling shifts coordinates similar to translation. The difference is, that translation is independent of the current coordinates. Scaling however shifts the coordinates depending on the current values. So the same trnasformation matrix has various effects on different vectors.
For the sake of simplicity scaling is explained for two-dimensional space. But the behavior of the parameters is the same for an additional third dimension. Scaling is achieved by modifying the components and on the first diagonal of the transformation matrix , while the other components are zero:
The computation of scaling looks as follows in component notation:
So the values and act as factors for the x- and the y-component of the scaled vector.
Several different cases for and can be considered. The following transformation matrices show some of the possible cases, that achieve different scaling results:
▪ is the identity matrix → no effect
▪ x-component is scaled up → vector is shifted to positive x-direction
▪ x- and y-component are scaled up → vector is shifted diagonally to positive x- and y-direction
▪ x-component is inverted → vector is reflected on y-axis to negative x-direction
▪ y-component is scaled down → vector is shifted closer to x-axis