15.01.2015 Views

2D Matrix Transformations Lecture Slides

2D Matrix Transformations Lecture Slides

2D Matrix Transformations Lecture Slides

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Translations again<br />

We could do this:<br />

p ' = B(<br />

Ap + t)<br />

= BAp + Bt = Cp + u<br />

Ugly and awkward<br />

Some systems do it anyhow.<br />

Every transformation would be a matrix and a<br />

vector…<br />

Homogeneous coordinates<br />

Take a vector that represents a point and<br />

append a 1 at the end<br />

p<br />

p = <br />

p<br />

x<br />

y<br />

<br />

<br />

<br />

p<br />

p~<br />

=<br />

<br />

<br />

p<br />

<br />

1<br />

x<br />

y<br />

<br />

<br />

<br />

<br />

Homogeneous translation<br />

1<br />

p<br />

~ ' =<br />

<br />

<br />

0<br />

<br />

0<br />

0<br />

1<br />

0<br />

p<br />

~ ~<br />

' = Ap<br />

~<br />

tx<br />

<br />

p<br />

t<br />

<br />

y <br />

p<br />

1 <br />

<br />

1<br />

x<br />

y<br />

<br />

<br />

<br />

<br />

The tildes are for clarity. If only using homogeneous coordinates,<br />

we would omit them.<br />

Other transformations<br />

<br />

~ A<br />

A =<br />

<br />

0<br />

0<br />

Now everything looks the same…<br />

0<br />

0<br />

<br />

<br />

1<br />

Composing matrices<br />

Example<br />

When we rotate, we rotate about the origin<br />

Same for scale<br />

How could we do it about another point<br />

versus<br />

4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!