22_2DGraphicsIntro.3up

X 1 0 t x cos y 0 1 t y sin

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ransla:on as a 3x3 matrix? ! x ' \$ ! 1 0 tx \$! x \$ ! x + tx \$ # &# &# &# # y ' & = # 0 1 ty &# y & = # y + ty # 1 & # 0 0 1 &# 1 & # 1 " %" %" %" & & & % 29 Transla:on •  Example of transla:on ! x ' \$ ! 1 0 2 \$! x \$ ! x + 2 # &# &# &# # y ' & = # 0 1 1 &# y & = # y + 1 # 1 & # 0 0 1 &# 1 & # 1 " %" %" %" \$ & & & % tx = 2 ty = 1 30 Homogeneous Coordinates •  Add a 3rd coordinate to every 2D point –  (x, y, w) represents a point at loca:on (x/w, y/w) –  (x, y, 0) represents a point at inﬁnity –  (0, 0, 0) is not allowed y 2 Convenient coordinate system to represent many useful transformations (2,1,1) or (4,2,2) or (6,3,3) 1 1 x 2 31 Vectors? •  Points: represent a posi:on •  Vectors: represent direc:on and magnitude •  Opera:ons: –  Vectors: add, scalar mul:ply –  Points: subtract –  Both: point + vector Represen:ng Vectors ! v \$ ! w \$ ! v +w x x &# x&# x # v + w = # vy & + # wy & = # vy + wy # &# &# 0 # &# &# "0%"0%" % " p −q '\$ x x ' = \$ py − q y '...
View Full Document

This note was uploaded on 03/19/2013 for the course CSC 101 taught by Professor Merl during the Fall '12 term at Arizona State University at the West Campus.

Ask a homework question - tutors are online