Professional Documents
Culture Documents
+ + +
=
(
(
(
(
(
(
(
(
* * * *
* * * *
* * * *
* * *
* * *
* * *
* * *
* * *
* * * *
* * * *
* * * *
dh cg bf ae
h
g
f
e d c b a
A B B A =
| |
(
(
(
(
+ + +
=
(
(
(
(
*
*
*
* * *
* * *
* * *
* * *
dh cg bf ae
h
g
f
e
d c b a
Bv vB=
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
4
Determinants
If A is a [2 x 2] matrix then det(A) = ad-bc
In this case, det(A) = area of parallelogram
defined by vectors (a,c) and (b,d)
General determinate is defined recursively
by minors
minors are computed by eliminating the
row and column of an entry and
computing the determinant on the
residue.
Few reminders
Determinants are multiplicative
|AB|=|A||B|
|A|=|A
T
|
a b
A
c d
(
=
(
1
( 1)
n
i j
nxn ij ij
j
A a M
+
=
=
(
(
(
(
(
(
(
(
(
(
(
(
=
` ` ` `
` ` ` `
` ` ` `
` ` ` `
' ' ' ' ' ' ' '
' ' ' ' ' ' ' '
' ' ' ' ' ' ' '
' ' ' ' ' ' ' '
' ' ' '
' ' ' '
' ' ' '
' ' ' '
p o n m
l k j i
h g f e
d c b a
p o n m
l k j i
h g f e
d c b a
p o n m
l k j i
h g f e
d c b a
p o n m
l l j i
h g f e
d c b a
M
Modeling
Matrix
Viewing
Matrix
Projection
Matrix
Screen
Matrix
M V V = '
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
13
Line equations
What are the available forms
Explicit form F(x) = ax +b
Implicit form F(x,y) = ax + by +c = 0
Parametric form F(t) = P
0
+t(P
1
- P
0
)
Applications
A point on a line query
Traverse the line
Rendering
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
14
Point-Line Distance
<(P
0
P
1
),(P-P
2
)> = 0
<(P
0
P
1
),(P
0
+t(P
1
-P
0
)-P
2
)> = 0
Solve for t
Substitute into the first equation to get the value of P.
Find the distance between P and P
2
as usual.
P
P
1
P
0
P
2
(1) :P = P
0
+t(P
1
-P
0
)
2 0 1 0 2 0 1 0 2 0 1 0
1 0 1 0
( )( ) ( )( ) , x x x x y y y y P P P P
t
P P P P
+ < >
= =
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
15
Point-Plane Distance
The projection of the line (P
a
,P
b
) on the normal is
given by:
Substitute the following to solve the equation:
P
a
P
b
P
Ax+By+Cz+D =0
P=(x,y,z)
o
n
( ) ( ) ( )
b a b a b a
A x x B y y C z z
Dist
n
+ +
=
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
16
Line-Line Intersection
1 1 1 1 2 2 2 2
0 1 0 0 1 0
1 2
1 1 1 1 2 2 2 2
0 1 0 0 1 0
( ) ( ) ( ) ( )
[0,1] [0,1]
( ) ( ) ( ) ( )
x t x x x t x r x x x r
L t L r
y t y y y t y r y y y r
= + = +
= e = e
= + = +
At an intersection point, the x and y values are equal in both
representations, forming two linear equations in two unknowns (r,t).
Question: What is the meaning of r,t < 0 or r,t >1 ?
(x
0
1
,y
0
1
)
(x
1
1
,y
1
1
)
(x
1
2
,y
1
2
)
(x
0
2
,y
0
2
)
L
1
L
2
1 1 1 2 2 2
0 1 0 0 1 0
1 1 1 2 2 2
0 1 0 0 1 0
( ) ( )
( ) ( )
x x x t x x x r
y y y t y y y r
+ = +
+ = +
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
17
Linear Operators
Definition: A linear operator, L:AB, satisfies the following:
L(aX+bY) = aL(X) + bL(Y)
Examples
( ) ( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
D af x bg x D af x D bg x
aD f x bD g x
+ = +
= +
Scaling
( ) ( ) ( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) ( ) x g bS x f aS
x bsg x asf
x bg x af s x bg x af S
+ =
+ =
+ = +
Differentiation
D(h(x)) = h(x)
S(h(x)) = sh(x)
Question: Is F(X) = oX+| a linear operation ?
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
18
Linear Operators (cont).
Answer: No !!
( )
( )
( ) ( )
( ) ( ) (1 )
( ) ( ) (1 )
F aX bY
aX bY
aX bY
a X b Y
a X b Y a b
aF X bF Y a b
o |
o o |
o o |
o | o | |
|
+
= + +
= + +
= + +
= + + + +
= + +
Definition: An affine operator, A, satisfies:
A(aX+bY) = aA(X) + bA(Y), for a+b = 1
Question: Is F(X) = oX+| an affine operation ?
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
19
Convexity
.
2 1
, 2 For .
1
.
1
of an is
1
say that We
.
1
0 , 1 ,
1
let and points, be
1
Let
P P P n
n
i
i
P CH P
n
i
i
P
i
P
n
i i
a P
n
i i
a
i
a
n
i
i
a n
n
i
i
P
e =
=
e
=
=
=
=
> =
= =
|
|
.
|
\
|
)
`
)
`
)
`
)
`
n combinatio affine
An object 0 is convex iff for any two points
P,Qe0,
tP+(1-t)Qe0, te[0,1].
P
Q
( )Q t tP + 1
0
The convex hull CH(0), of an object 0,
is the minimal convex shape C, such
that 0_C.
C
0
C=CH(0)
Basic Geometry - Center for Graphics and Geometric Computing,
Technion
20
Curves
( ) ( ) ( )
| |
T C t
dC t
dt
x t y t = ' = = ' '
( )
,
C(t) may be thought of as the
trajectory of a point in time.
The unit length tangent vector is
( )
( ) ( ) | |
( ) ( )
2 2
,
t y t x
t y t x
t C T
' + '
' '
= =
( ) t C
( )
dt
t dC
T =
Let C(t)=[x(t),y(t)] te[T
0
,T
1
]
be a continuous uni-
variate parametric curve. The tangent vector is
T=C(t):
C(t) is the velocity vector at
time t.