CSCE 441 Lecture 9
« previous | Monday, February 3, 2014 | next »
Affine Transformations as Matrices
Goal is to construct matrix such that a Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 2 \times 2}
matrix is multiplied by our input vector and a 2-coordinate vector Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle t}
that is added to our input vector.
Dot Product
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{v} \cdot \vec{w} = \vec{v}^T \, \vec{w} = \begin{bmatrix} \vec{v}_x & \vec{v}_y \end{bmatrix} \, \begin{bmatrix} \vec{w}_x \\ \vec{w}_y \end{bmatrix}}
2D Cross Product
Multiply by matrix Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \perp = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}}
Translation
Our 2 × 2 matrix Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle M} is just the identity matrix, and our Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle t} -coordinates become our translation values:
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} I & t \\ 0 & 1 \end{bmatrix} \, \begin{bmatrix} \vec{p} \\ 1 \end{bmatrix} = \begin{bmatrix} \vec{p} + t \\ 1 \end{bmatrix}}
In expanded notation:
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} 1 & 0 & t_x \\ 0 & 1 & t_y \\ 0 & 0 & 1 \end{bmatrix} \, \begin{bmatrix} \vec{p}_x \\ \vec{p}_y \\ 1 \end{bmatrix} = \begin{bmatrix} \vec{p}_x + t_x \\ \vec{p}_y + t_y \\ 1 \end{bmatrix}}
Uniform Scaling
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} \alpha \, I & \left( 1-\alpha \right) \, o \\ 0 & 1 \end{bmatrix} \, \begin{bmatrix} \vec{p} \\ 1 \end{bmatrix} = \begin{bmatrix} \alpha \, \vec{p} + (1-\alpha) \, o \\ 1 \end{bmatrix}}
Non-Uniform Scaling
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} I + \left( \alpha - 1 \right) \, \vec{v} \, \vec{v}^T & \left( 1-\alpha \right) \, \vec{v} \, \vec{v}^T \, o \\ 0 & 1 \end{bmatrix} \, \begin{bmatrix} \vec{p} \\ 1 \end{bmatrix}}
Rotation
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} I & o \\ 0 & 1 \end{bmatrix} \, \begin{bmatrix} \cos{\theta} \, I + \sin{\theta} \, \perp & 0 \\ 0 & 1 \end{bmatrix} \, \begin{bmatrix} I & -o \\ 0 & 1 \end{bmatrix} \, \begin{bmatrix} \vec{p} \\ 1 \end{bmatrix}}
Shear
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{bmatrix} I + \alpha \, \vec{v} \, (\vec{v}^\perp)^T & -\alpha \, \vec{v} \left( \vec{v}^\perp \right)^T \, o \\ 0 & 1 \end{bmatrix} \, \begin{bmatrix} \vec{p} \\ 1 \end{bmatrix}}
Finding Affine Transformations
Image of 3 points determines unique affine transformation
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle M \, \begin{bmatrix} \vec{p} & \vec{q} & \vec{r} \\ 1 & 1 & 1 \end{bmatrix} = \begin{bmatrix} \hat{p} & \hat{q} & \hat{r} \\ 1 & 1 & 1 \end{bmatrix}}
Hence
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle M = \begin{bmatrix} \hat{p} & \hat{q} & \hat{r} \\ 1 & 1 & 1 \end{bmatrix} \, \begin{bmatrix} \vec{p} & \vec{q} & \vec{r} \\ 1 & 1 & 1 \end{bmatrix}^{-1}}
Composing Transformations
Multiply all of the matrices together
Fractals and Iterated Affine Transformations
Fractals are recursion made visible:
A self-similar shape created from a set of contractive transformations