Revew: Trnsforons Trnsforons Modelng rnsforons buld cople odels b posonng (rnsforng sple coponens relve o ech oher ewng rnsforons plcng vrul cer n he world rnsforon fro world coordnes o cer coordnes Perspecve proecon of 3D coordnes o 2D Anon vr rnsforons over e o cree oon CSE 68 CSE 68 Trnsforons - Modelng Trnsforons - ewng world OBJECT CAMERA WORLD CSE 68 CSE 68
Modelng Trnsforons Affne Trnsforons Trnsfor obecs/pons Trnsfor coordne sse Trnsfor P (,, o Q (,, Affne rnsforon: + 2 + 3 + 4 2 + 22 + 23 + 24 3 + 32 + 33 + 34 CSE 68 CSE 68 Trnslon Sclng Trnslon b (,, : + + + (,, Sclng b (s, s, s : s s s CSE 68 CSE 68 2
Roon Roon round -s Roon couner-clocwse b ngle round he -s: cos( sn( sn(+cos( r r Proof: α r cos(α r sn(α r cos(α + r cos(α cos( r sn(α sn( cos( sn( r sn(α + r cos(α sn( + r sn(α cos( sn( + cos( Roon couner-clocwse b ngle round he -s: cos( sn( sn( + cos( CSE 68 CSE 68 Roon round -s Roon couner-clocwse b ngle round he -s: cos( sn( sn( + cos( Or cos( + sn( sn( + cos( CSE 68 Sclng b (s, s, s : s s s Roon couner-clocwse b ngle l round dhe -s: cos( sn( sn( + cos( Trnslon b (,, : + + + Mr Mulplcon s s s cos( sn( sn( cos( CSE 68? 3
4 Hoogeneous Coordnes Represen P b (,,, nd Q b (,,, (Hoogeneous coordnes Trnslon b (,, : + + CSE 68 Sclng b (s, s, s : s s s s s s + Roon Mrces Roon couner-clocwse b ngle round he -s: cos( sn( sn( + cos( cos( sn( sn( cos( l b l d h CSE 68 cos( sn( sn( cos( cos( sn( sn( cos( Roon couner-clocwse b ngle round he -s: cos( sn( sn( + cos( Roon couner-clocwse b ngle round he -s: cos( + sn( sn( + cos( Affne Trnsforon Mr Affne rnsforon: + 2 + 3 + 4 2 + 22 + 23 + 24 CSE 68 3 + 32 + 33 + 34 Trnsforon Mr: 34 33 32 3 24 23 22 2 4 3 2 Sherng Sher long he -s: + h CSE 68 h
Reflecon cross he -s: (- Reflecon Reflecon s specl cse of sclng! Eleenr Trnsforons Trnslon Roon Sclng Sher Wh bou nverses? CSE 68 CSE 68 Inverse Trnsforons Copose Trnsforons Trnslon Scle Roon Scle b (2,, Trnsle b (2, 5, Roe b 3 couner-clocwse round dhe -s Trnsle b (, -5, Sher CSE 68 CSE 68 5
6 Copose Trnsforon Mrces Scle b (2,, ; Trnsle b (2, 5, ; Roe b 3 couner-clocwse round he -s; T l b ( 5 CSE 68 2 Scle 5 2 Trnsle 86 5 5 86 Roe Trnsle b (, -5, 5 Trnsle Copose Trnsforon Mrces Scle b (2,, ; Trnsle b (2, 5, ; Roe b 3 couner-clocwse round he -s; T l b ( 5 CSE 68 443 88 47 5 72 Trnsle b (, -5, Order Mers! Trnsforons re no necessrl couve! Trnsle b (2,, R b 3 Roe b 3 T l b (2 CSE 68 Roe b 3 Trnsle b (2,, Order of Trnsforon Mrces Appl rnsforon rces fro rgh o lef Trnsle b (2,, R b 3 2 86 5 5 86 CSE 68 Roe b 3 Roe b 3 Trnsle b (2,, 86 5 5 86 2
7 Trnslon nd rnslon? Sclng nd sclng? Roon nd roon? l d l Whch rnsforons coue? CSE 68 Trnslon nd sclng? Trnslon nd roon? Sclng nd roon? Eleenr Trnsforons Eleenr rnsforons: Trnslon; Roon; Sclng; Sher CSE 68 Theore: Ever ffne rnsforon cn be decoposed no eleenr operons Euler s Theore: Ever roon round he orgn cn be decoposed no roon round he -s followed b roon round he -s followed b roon round he -s (or sngle roon bou n rbrr s ecors ecor (,, Hoogeneous coordnes: (,,, CSE 68 Affne rnsforon: 34 33 32 3 24 23 22 2 4 3 2 ecors Roon: cos( sn( sn( cos( s CSE 68 Sclng: Trnslon: (Noe: No chnge s s
P Trnsfor Prerc Lne P(u u M M M u Q(u Q W Lne rnsfored pon on lne? pon on rnsfored lne M(P(u T? M(P T + u* T Lne hrough P (,,, n drecon (,,, : P(u P T + u* T {(,,, + u* (,,, : u Rels} Appl ffne rnsforon r M o lne P(u: M *P(u { M (P T + u T : u Rels} { M P T + um T : u Rels} { Q + u : u Rels} Theore: Affne rnsforons rnsfor lnes o lnes CSE 68 CSE 68 Affne Trnsforon of Lnes Affne Cobnons P R b M Q M M R b Q P CSE 68 CSE 68 8
Affne Cobnons Properes of Affne Trnsforons Affne cobnons of P (,,, nd Q (,,, : {R (,,, + b (,,, :,b Rels nd + b } Appl ffne rnsforon r M o ( P T +bq T gves: M ( P T + b Q T M P T + M b Q T M P T + b M Q T P + b Q MR R Theore: Affne rnsforons preserve ffne cobnons Affne rnsforons p lnes o lnes; Affne rnsforons preserve ffne cobnons; Affne rnsforons preserve prllels; Affne rnsforons chnge volue b De(M ; An ffne rnsforon cn be decoposed no eleenr rnsforons Affne rnsforons [does/does no] preserve ngles? Affne rnsforons [does/does no] preserve he nersecon of wo lnes? Affne rnsforons [does/does no] preserve dsnces? CSE 68 CSE 68 Properes of Trnsforon Mrces Properes of Pure Roon Mrces Frs colun s how (,,, rnsfors Second colun s how (,,, rnsfors Thrd colun s how (,,, rnsfors Mr holds how coordne es rnsfor nd how orgn rnsfors?? 2? 3? 4???????? 2???? 3???? 4 2 3 4 22 23 24 32 33 34 42 43 44 2 3 4 22 23 24 32 33 34 44 42 43 Rows (coluns re orhogonl o ech oher A row do produc n oher row Ech row (colun do produc es self R T R - CSE 68 CSE 68 9
Coordne Fre Orenon Rgh hnded coordne sse: Lef hnded coordne sse: (Ino pge Coordne fre s gven b orgn nd hree uull orhogonl un vecors,,, - defned n (,, spce Muull orhogonl (do producs:?;?;? Un vecors (do producs:?;?;? (Ou of pge CSE 68 CSE 68 Orenon Rgh hnded coordne sse: Lef hnded coordne sse: Coordne Trnsforons Gven obec d pons defned n he (,,, coordne fre, Gven he defnon of (,,, n (,, coordnes, Cross produc:? Cross produc:? How do ou deerne he coordnes of he obec d pons n he (,,, fre? How do ou es wheher (,, s lef hnded or rgh hnded? CSE 68 CSE 68
Coordne chnge (Trnslon (,, b CSE 68 c b c (,, Chnge fro (,b,c, coordnes o (,,, coordnes: Move (,b,c, o (,,, nd nver 2 Move d relve fro (,, ou o poson b ddng Coordne chnge (Roon (,, b -s roon b CSE 68 c b c (,, Chnge fro (,b,c, coordnes o (,,, coordnes: Roe (,b,c b nd nver 2 Roe d b - Obec Trnsforons CSE 68 Gven (,,,p defned n he (,,, coordne fre, Trnsfor pons defned n he (,,, coordne fre o he (,,, coordne fre Roe obec o ge o lne up wh, hen rnsle o Obec Trnsforons CSE 68 Affne rnsforon r:
2 Coordne Trnsforons CSE 68 Gven (,,,p defned n he (,,, coordne fre, Trnsfor pons n (,,, coordne fre o (,,, coordne fre Appl rnsfor o coordne sse, hen nver: Coordne sse rnsfor: rnsle b -, hen roe o lgn wh Coordne Trnsforons CSE 68 R T Coordne Trnsforons CSE 68 Affne rnsforon r: Appl RT o coordne sse Appl (RT - o d T - R - Coposon of coordne chnge M 2 M 2 CSE 68 M chnges fro coordne fre (,,, o (,,, M 2 chnges fro coordne fre (,,, o (,,, Chnge fro coordne fre (,,, o (,,,:? π
Coposon of rnsforons - eple B B A Trnsforons of norl vecors n n s un norl vecor o plne π M s n ffne rnsforon r How s n rnsfored, o eep perpendculr o he plne, under: rnslon? roon b? unfor sclng b s? sherng or non-unfor sclng? π CSE 68 CSE 68 Sher rnsforon n n n n s un norl vecor o plne π: (-n, M s sher rnsforon r h onl odfes -coordnes If we us rnsfor he n s vecor, hen M n T n Bu we wn n h hs non-ero -coordne vlue CSE 68 Trnsforons of norl vecors Plnr equon: + b + c + d Le N (, b, c, d (Noe: (, b, c s norl vecor Le P (,,, be pon n plne π n π Plnr equon: N P P M s n ffne rnsforon r (M T s M rnspose Le P M P T Fnd N such h N P (rnsfored plnr equon N P ; NP T ; N (M - M P T ; (N M - (M P T ; (N M - P T ; So N NM - To pu n colun-vecor for, (N T (NM - T (M - T N T So N ((M - T N T T nd (M - T s he rnsforon r o e N T no N T Noe: If M s roon r, (M - T M CSE 68 3