transforming transformations james f. blinn · cse590b lecture 4 more about p1 transforming...
TRANSCRIPT
CSE590B Lecture 4
More about P1
Transforming Transformations
James F. Blinn JimBlinn.Com
http://courses.cs.washington.edu/courses/cse590b/13au/
Previously On
CSE590b
Transformations
M
A B
C D
M
A B
x w x wC D
x Ax Cw
w Bx Dw
The Function
x Ax Cw
w Bx Dw
x
w
x
w
A
B
D
B
0
0 0
x Aw
w B
x Dw Bx Dw
w B
The “Phase Space” of M
M MM MM M
M MM M d
sing
ular
dM
M
0
M MM
M
0
Nilpotent
2t
d
1 2tan , td
Also a valid matrix
Possible
numeric
signatures
New Coordinate System A B E F G H
C D G H E F
2 2 2 2
214
2 2 214
E H F G
t E
H F Gd
2 2 2 2
AD BC
E F E F G H G H
E H F G
2
2 2 2
4
4
A D AD BC
F G H
d
2t A D E
Plot in EFGH space
2 2 2
0 1H F G
E E E
2 2 2
0H F G
E E Ed
F/E
B/E
0 plane at infinityt
Compare with Q version
H/E
G/E
F/E
2 2 2
2 2 2
0 1
0 plane at infinity
0
H F G
E E E
t
F G H
E E Ed
Roadmap of M
2 2 2 2
2 2 2 2
ˆcos sin
ˆsin cos
ˆ ˆ
E E
H H
E H F G
E H F G
2 2 2
2 2 2
ˆ0 1 0
ˆ ˆ ˆ
ˆ0 1
ˆ
ˆ0 sin cos 0
ˆ ˆ
H F G
E E E
Ht
E
H F G
E E Ed
−3
−2
−1
01
23
y
E H
0
1
1
0
identity
singular
rotations
Involutions
(trace=0)
d = 0
Single eigenvalue
Nilpotent
And Now
IM
M
Finding Real Eigenvalues
det 0 M I
Find such that
singular
Outside cone (red,blue):
Two intersections on line
Inside cone (green):
No intersections on line
Linear combo of M and I is singular
Transformation of Transformations *
A BA B
C DC D
T T
p q A B s qA B
r s C D r pC D
t u A B v uA B
s v C D s tC D
A tvA uvC stB sqD
B utA uuC tB tqD
C svA vvC ssB svD
D usA uvC tsB tvD
ts us ts uv AA
us tv ts uv DD
tu tu tt uu BB
rv rv rr vv CC
Transformation of Transformations
p q A B s qA B
r s C D r pC D
1 1 0 0
1 1 0 0
0 0 1 1
0 0 1 1
A E
D F
B G
C H
ts us ts uv AA
us tv ts uv DD
tu tu tt uu BB
rv rv rr vv CC
1 12 2
1 12 2
0 0 0
0
0
0
tv us EE
tv us ts uv ts uv FF
tu sv tt ss uu vv tt ss uu vv GG
tu sv tt ss uu vv tt ss uu vv HH
A B E F G H
C D G H E F
Distill with Rotation Transform
cos sin
sin cos
t u
s v
1 12 2
1 12 2
0 0 0
0
0
0
tv us EE
tv us ts uv ts uv FF
tu sv tt ss uu vv tt ss uu vv GG
tu sv tt ss uu vv tt ss uu vv HH
1 0 0 0
0 cos 2 sin 2 0
0 sin 2 cos 2 0
0 0 0 1
EE
FF
GG
HH
E
FB
E
F
Similar to
what we did
with Q:
Rotation Transform
1 0 0 0
0 cos 2 sin 2 0
0 sin 2 cos 2 00
0 0 0 1
EE
FF
G
HH
2 2 2E H F
2 214
F H
F H F H
d
Rotate to make G zero
12t E
E
H
Ft 0
= 0
d = 0
d = 0 ~
~
Note: Not dividing by E yet
Rotation Transform
1 0 0 0
0 cos 2 sin 2 0
0 sin 2 cos 2 00
0 0 0 1
EE
FF
G
HH
2 2 2E H F
2 214
F H
F H F H
d
Rotate to make G zero
12t E
E
H
Ft
d
Project onto unit sphere
[E,F,G,H]
Mappings
E
H
F
E
F
Quadratic Polys (3D)
E
FB
F/E
B/E
project
Transformation mtx (4D)
project
rotate
rotate
Sign Flips
1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
0 0 0 1
EE
FF
GG
HH
1 0 0 0
1 0 0 1 0 0
0 1 0 0 1 0
0 0 0 1
EE
FF
GG
HH
1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
0 0 0 1
EE
FF
GG
HH
Rotating 90 degrees flips (F,G) sign
Scaling by -1 in x flips (E,F) signs
Exchanging x,w flips (E,G) signs E
H
F
t
d
Sign Flips
1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
0 0 0 1
EE
FF
GG
HH
Exchanging x,w flips (E,G) signs E
H
F
t
d
Sign Flip effect on angle range
E
H
0o-90
o
-180o
+180o
+90o
E
H
0o-90
o
+90o
+170o
+10o
-10o
10 10/
170 10
Further transform that keeps G=0
12
12
0 0
0
0
0
tv usEE
tv us ts uvFF
tu sv tt ss uu vvGH
tu sv tt ss uu vvH
0
0
tu sv
tt ss uu vv
s u s uor
v t v t
E
H
F
t
d
t u
u t
= Diagonal scale
Effect of Diagonal Scale
0 0
0 2
0 2
E tt uu Et u
F tt uu tu Fu t
H tu tt uu H
E
H
Ft
d
2 2
2 2
4
4
F H
t E
d
22 2
22 2 2 2
E tt uu E
F H tt uu F H
2 2 2
2 2 2 2
E E t
F H F H d
2 2 2 20 E t F Hd
Effect of Diagonal Scale
E
H
Ft=0
d 0
0
2 2 2 2 2
2
2 22
2 2
2 22
2
0 0 plane
0 0 cone along axis
0 0 intersecting planes
0 0 cone along axis
0 0 plane
neg
neg
t E t H F
E
E tH tF F
tH tF
E tH tF H
E
d d
d
d
d
d
sing
ular
dNilpotent
t
2 2
2 2
2 , discrim
2 , discrim
F ttF tuH uuF H F
H ttH tuF uuH F H
Diagonal Scale to get F or H zero
0 0
0 2
0 2
E tt uu Et u
F tt uu tu Fu t
H tu tt uu H
H
F
H
F E
H
F
t
d
If positive can make F=0
If positive can make H=0
d=0 case
H
F
0 0
0 2
0 2
E tt uu E
F tt uu tu F
H tu tt uu H
0
0 2
0
0
H F
tt uu EE
tt tu uu FF
t u Et u
t u F
0
0 2
0
0
H F
tt uu EE
tt tu uu FF
t u Et u
t u F
H
F
Distilled EFGH Space
H
F1 0
0 1
0
0
E F
E F
1 1
1 1
2 1
1 0
2 1
1 0
1 1
1 1
1 0
0 1
0 1
1 0
0 1
1 0
E H
H E
1 0
0 0
Phase Dgm and Distilled
H
F1 0
0 1
0
0
E F
E F
1 1
1 1
2 1
1 0
2 1
1 0
1 1
1 1
1 0
0 1
0 1
1 0
0 1
1 0
E H
H E
sing
ular
d
M
M
0
M MM
M
0
Nilpotent
M MM MM M
M MM M d
Phase Dgm and Distilled
H
F1 0
0 1
0
0
E F
E F
1 1
1 1
2 1
1 0
2 1
1 0
1 1
1 1
1 0
0 1
0 1
1 0
0 1
1 0
sing
ular
d
M
M
0
M MM
M
0
Nilpotent
M MM MM M
M MM M d
M VRM MVR VR
VR
M VR H
Distinguish
between
E
FB
Q
I
0 1
1 0
Phase Dgm and Distilled
H
F1 0
0 1
0
0
E F
E F
1 1
1 1
2 1
1 0
2 1
1 0
1 1
1 1
1 0
0 1
0 1
1 0
0 1
1 0
sing
ular
d
M
M
0
M MM
M
0
Nilpotent
M MM MM M
M MM M d
M VR H Use if d £ 0
Internal Structure
Using outer products to make M
tk unM =
1 0
0 1
A BA B C D
C D
1 0 0 1A B A B
C D C D
Write k,n in terms of t,u
tuk = a + b
tun = c + d
M = t ttua b
c u utu d
tk unM =
Transformation
M
= t ttua b
c u utu d
T* T
T
T
T
T
T*
T*
T*
T*
uT* uT
uT
u ~
M = t ttua b
c u utu d
~ ~ ~
~
~ ~
~~~
=u T u~
=t T t~
Pick nice t,u
t
u
= 0 1
= 1 0
t ttu
u utu
0 0
0 1
0 0
1 0
0 1
0 0
1 0
0 0
t
tt
u D
+ B
C u
ut
u
AA B
C D
t
tt
u D
+ B
C u
ut
u
AM~ ~ ~ ~ ~
~~~~
Nilpotent
M M
Nilpotent
= 0MM
M
H
F1 0
0 1
0
0
E F
E F
1 1
1 1
2 1
1 0
2 1
1 0
1 1
1 1
1 0
0 1
0 1
1 0
0 1
1 0
0 1
0 0
0
0
1
1
A B E F G H
C D G H E F
E
F
G
H
1 1
1 1
0
1
0
1
A B E F G H
C D G H E F
E
F
G
H
Distilled: Can Transform to:
Nilpotent
0 1
0 0
ttN
t
H
F
M M
Nilpotent
= 0MM
M
ttN a a
ttN t t
x
w
x
w
ttN N tt
d
2t
Idempotent 0 0
0 1
tu
H
F
M M
= 0MM
M
sin
gu
lar
tuD
tuD a a
tuD t t
tuD u u 0
x
w
x
w
tuD tuD
d
2t
An Identity
t u t u
M M
= 0MM
M
t u tu
tu
t u tu
tu
H/E
G/E
F/E
t u
t u tu I
General Scales (Eigenvectors)
0
0
E F
E F
u tut(E+F) +(FE)M =
ut(E+F)M =u u
u
tu+ (F-E)M =t t
t
H
FM M
= 0MM
M
x
w
x
w
x
w
x
w
H/E
G/E
F/E
E/H
G/H
F/H
d
2t
Scale Involution (Eigenvectors) 0
, 00
E FE
E F
u tutF +FVS =
utFM =u u
u
tuFM =t t
t
H
FM M
= 0MM
M
x
w
x
w
H/E
G/E
F/E
E/H
G/H
F/Hd
2t
u t
Rotation
E H
H E
u tutE
+ H t uut
H
F
M M
= 0MM
M
x
w
x
w
IE
+ H t uut
^
d
2t
Rotation Involution
, 0E H
EH E
+ H t uut
H
F
M M
= 0MM
M
d
2t
x
w
x
w
A
B
D
B
Single eigenvalue d = 0
1 1
0 1
u
tu
t tt
H
F
MMd0 = 0
M
M M
IdentityI+N
x
w
x
w
I tt ^
d
2t
Pure & Mixed Tensors - A Relation
Q a,b
Q T
Q T
=0
F/E
B/E
T I
x,w a,b Q Q Q1
2a,b
Roots of Q
are
Eigenvalues of T
Exemplary Transformations
Exemplary Transformation
Tp q r r~q~p~
x
wp qr
x
wp q
r
Construct T given Eigenvectors
T = p qpq a b
T = pp p
T = qq q
T = p qpq a bp p p
p
Want
Basic Answer
How it works for p
Construct T given
two different output points
T = p qpq a b~ ~
T = pp p
T = qq q
~
~
Want
Basic Answer
Works for p and q
T = pqa ~p p
T = qpb ~q q
Third point
=r~ p~ q~c +d
T = p qpq a b~ ~
T = rr ~
T = p qpq a br r r~ ~
Pick a and b to make
= p qpq a br r~ ~r~
= +p
r
q r q
p
p r
q~
~ ~
~
~ ~
~
~
The answer
a = pr
rp~ ~qr
qr~ ~
b=
T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
How it works
T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
pp p
T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
qq q
T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
rr r
T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
pp p
T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
qq q
T =qq ~
+pr rp~ ~
rr p~
qr~ ~
=q
pr
r r~
qp~ ~
How it works T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
T = p
q
~p r
q r~~p
p
T = qp
~r p~~q r
=q
pr
rr~qp~ ~Tr
Net T =p qpq ~ ~+
pr rp~ ~qrqr~ ~
Determinant
T =
p qpq ~ ~+
pr rp~ ~qrqr~ ~
T
=T
q
r
q
p
r p
q
r
q
p
r p
~~
~
~ ~
~
p q r
r pq
qr p
r q p
p rq
pr q
q
r
q
p
r p
An invariant of the points p,q,r Geometric meaning of sign
Determinant is negative
exactly when necessary
for order reversal
Higher Dimensions
Tp
q
db
p~ ~q
db~~
Higher Dimensions
Tp
q
sr
p~ ~q
sr~~
T = p q
q
~ ~+ bs~ g
s
s
p
p
qa
Works for p,q,s
Now find a,b,g to make it work for r
Higher Dimensions
T
p
q
q
~
~
s~
s
s
p
p
q
s
p
p
q
r
r
q
s
p
q
r
r
s
p
q
s
r
rr
s
q
r
p
s
r
q
p
T =p q
p
q ~ ~+
pr rp~ ~
qr
qr~ ~
p
p
p
s
s
s
q
q
q
Four Points in P1
A B C D
D B
C
A
A B C
D
x
w
Interleaving of Four Points
D A B C
D A BC
B CD A
A B C D
D B
C
A
B A C D
A B C
D
x
w
Same interleaving
Different interleaving
D A
C
B
AB C
D
x
w
Three possible interleavings
A B D C
A B C
D
x
w
w
x
A BC
D
w
x
A B CD
A B C D
A C B D
D B
C
A
D C
B
A
C B
D
A
Diagrams for Four Points
A A Ax w A
B B Bx w B
C C Cx w C
D D Dx w D A D
A C
A B
B D
B C
C D
A D
A C
A B
D B
B C
C D1V
2V
3V
Diagrams for Four Points
A DA CA B D B B CC D 0
1 2 3 0V V V
A D
A C
A B
D B
B C
C D1V
2V
3V
Cross Ratio
1
2
2 2
3 1 2
3 1 2
1 1
1
1
11
V
V
V V
V V V
V V V
V V
31 2
2 3 1
, ,VV V
V V V
B C
A C
A D
B D2
3
V
V
Could pick any of as “cross ratio”
Relationship
between
“Absolute Invariant”
3D view of invariant space
V3
V2
V1
V1
V2
V3
1 2 3 0V V V
2 2 2
1 2 3 1V V V
1
1cos V
A D
A C
A B
D B
B C
C D1V
2V
3V
Homogeneously
scale to normalize
onto unit circle
3D view of invariant space
V3
V2
V1
V1
V2
V3
V3 V2
V1
V3 V2
V1
1 2 3 0V V V
Determine which sign
indicates which interleaving
1 1
0 1
1 1
x w
A
B
C
D
AB
C
D
x
w
A D
A C
A B
D B
B C
C D1V
2V
3V
w x
2x
w x
Follow in V space
A B C
D
1
2
3
1 0
1
2
1
V
V
V
D
A B CD
1
2
3
1 1
0
2
2
V
V
V
D
V3 V2
V1
V3 V2
V1
V3 V2
V1
A B CD
1
2
3
1 3
2 2
1
1
2
V
V
V
D
Follow in V space
A B C
D
1
2
3
1 0
1
2
1
V
V
V
D
A B CD
1
2
3
1 1
0
2
2
V
V
V
D
V3 V2
V1
V3 V2
V1
V3 V2
V1
A B CD
1
2
3
1 3
2 2
1
1
2
V
V
V
D
A B CD
1
2
3
0 1
1
0
1
V
V
V
D
V3 V2
V1
A B CD
1
2
3
1 3
2 2
2
1
1
V
V
V
D
V3 V2
V1
V3 V2
V1
A B CD
1
2
3
1 1
1
0
1
V
V
V
D
2V1V
3V
…
Follow in V space
A B C
D
1
2
3
1 0
1
2
1
V
V
V
D
A B CD
1
2
3
1 1
0
2
2
V
V
V
D
V3 V2
V1
V3 V2
V1
V3 V2
V1
A B CD
1
2
3
1 3
2 2
1
1
2
V
V
V
D
A B CD
1
2
3
0 1
1
0
1
V
V
V
D
V3 V2
V1
A B CD
1
2
3
1 3
2 2
2
1
1
V
V
V
D
V3 V2
V1
V3 V2
V1
A B CD
1
2
3
1 1
1
0
1
V
V
V
D
Harmonic Set
A B D
C
D B C
A
2V1V
3V 2V
3V
Can
transform
to
Can
transform
to
Determine which sign
indicates which interleaving
1 1
0 1
1 1
x w
A
B
C
D
1
2
3
^ ^
^ ^ 2
^ ^
V w x
V x
V w x
A B C D
A C B D
A D B C
A B C
1V w x
D
A B C
2 2V x
A B C
3V w x
Signs and interleaving Sign(V1,V2,V3) Ordering of points on P1 View in (x,w) plane
D B
C
AA B C
D
A B C
D
C B
D
AA B CD
A B C
D
C D
B
AA B C
D
A B C
D
Better Interleaving Test
1 2 2 2VV w x x x w x
A B C
A B C
2 3 2V V x w x
A B C
2 2
3 1V V w x w x w x
A B C
1V w x
D
A B C
2 2V x
A B C
3V w x
Old way
Better way
Diagrams
A C
A B
D B
C D
V1 V2 = A
C
A B
D
B
C D
A
C
A B
D
B
C D
A D
A C D B
B C
V2 V3 =A
D
A C
D BB
C= A
D
A C
D BB
C
A D
A B
B C
C D
V3V1 =A
D
A B
B
CCD
A
D
A B
B
CCD
Best Interleaving Test
w
x
A B C
D
A
D
A B
C
B
D C
0Û
w
x
A BC
D
A
D
A C
B
C
D B
0Û
A B CD
A
C
A B
D
B
C D
0Û