CSCE 441 Lecture 9

From Notes
Jump to navigation Jump to search

« previous | Monday, February 3, 2014 | next »


Affine Transformations as Matrices

This material will be on the midterm!
[p^xp^y1]=[M11M12txM21M22ty001][pxpy0]


Goal is to construct matrix such that a 2×2 matrix is multiplied by our input vector and a 2-coordinate vector t that is added to our input vector.


Dot Product

vw=vTw=[vxvy][wxwy]


2D Cross Product

Multiply by matrix =[0110]


Translation

Our 2 × 2 matrix M is just the identity matrix, and our t-coordinates become our translation values:

[It01][p1]=[p+t1]


In expanded notation:

[10tx01ty001][pxpy1]=[px+txpy+ty1]


Uniform Scaling

[αI(1α)o01][p1]=[αp+(1α)o1]


Non-Uniform Scaling

[I+(α1)vvT(1α)vvTo01][p1]


Rotation

[Io01][cosθI+sinθ001][Io01][p1]


Shear

[I+αv(v)Tαv(v)To01][p1]


Finding Affine Transformations

Image of 3 points determines unique affine transformation

M[pqr111]=[p^q^r^111]

Hence

M=[p^q^r^111][pqr111]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