06.09.2021 Views

Linear Algebra, 2020a

Linear Algebra, 2020a

Linear Algebra, 2020a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Topic: Computer Graphics 393<br />

In this topic we will show how to use these ideas to perform some effects<br />

from computer graphics. For that we will take the prior picture and redraw it<br />

without the sphere, with a movie projector at the origin, and with plane z = 1<br />

looking like a movie theater screen.<br />

( x<br />

p =<br />

y)<br />

projector, at (0, 0, 0) z = 1<br />

This associates vectors in three-space on the grey line with p in the screen plane.<br />

⎛<br />

⎜<br />

a<br />

⎞<br />

( ) ( )<br />

⎟ x a/c<br />

˜p = ⎝b⎠ ↦→ p = =<br />

y b/c<br />

c<br />

We can adapt the things we have already seen about matrices to perform the<br />

transformations. Rotation is an example. This matrix rotates in the plane z = 1<br />

about the origin by the angle θ.<br />

⎛<br />

⎜<br />

cos θ − sin θ 0<br />

⎞ ⎛ ⎞ ⎛<br />

x<br />

⎟ ⎜ ⎟ ⎜<br />

cosθ · x − sin θ · y<br />

⎞<br />

⎟<br />

⎝sin θ cos θ 0⎠<br />

⎝y⎠ = ⎝sin θ · x + cos θ · y⎠<br />

0 0 1 1<br />

1<br />

Notice that it works on any homogeneous coordinate vector; if we apply the<br />

matrix ⎛<br />

⎜<br />

cos θ − sin θ 0<br />

⎞ ⎛<br />

⎟ ⎜<br />

a<br />

⎞ ⎛<br />

⎟ ⎜<br />

cosθ · a − sin θ · b<br />

⎞<br />

⎟<br />

⎝sin θ cos θ 0⎠<br />

⎝b⎠ = ⎝sin θ · a + cos θ · b⎠<br />

0 0 1 c<br />

c<br />

and then move to the z = 1 plane<br />

⎛<br />

⎜<br />

cosθ · a − sin θ · b<br />

⎞ ⎛<br />

⎟ ⎜<br />

(cosθ · a − sin θ · b)/c<br />

⎞<br />

⎟<br />

⎝sin θ · a + cos θ · b⎠ ↦→ ⎝(sin θ · a + cos θ · b)/c⎠<br />

c<br />

1

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

Saved successfully!

Ooh no, something went wrong!