14
CS 3388 Working with 3D Vectors [Hill §4.1—4.4] x z y (1,2,0) (1,2,2)

CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

Embed Size (px)

Citation preview

Page 1: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

CS 3388Working with 3D Vectors

[Hill §4.1—4.4]

xz

y

(1,2,0)(1,2,2)

Page 2: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

2

Vector Spaces

• The space Rn is a vector space because it is closed under

• Setting n=3 is special case

u,v 2 Rn ) u + v 2 Rn

v 2 Rn, ® 2 R ) ®v 2 Rn

vector addition:

scalar multiplication:

Page 3: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

3

k-Flats and Subspaces

• A subspace is a subset of points• A k-flat is a subspace “congruent” to a

vector space of dimension k • A point is a 0-flat

• A line is a 1-flat

• A plane is a 2-flat xz

y

u

u

v

Page 4: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

4

Vector Norm

• Identities:

(triangle inequality)

Page 5: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

5

3D Dot Product

• Also known as inner- or scalar product since

• Notice • If assume (column vectors)

Page 6: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

6

Dot Product

• Identities:

• Geometry:xz

y

µ

b

a

Therefore…

Page 7: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

7

Dot Product as Projection

• The value is the length of a projected onto b multiplied by

• If then

a

b

a

b

Page 8: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

8

Sign of Dot Product

• If then a and b facing similar directions

• If then a and b facing opposite directions

• Useful for detecting front-facing and back-facing surfaces (much later

a

Page 9: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

9

Cross Product

• Also called vector product, as• Way to remember order:

(2£2 determinants)

careful!

Page 10: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

10

Geometry of Cross Product

• The vector where

• If and

then

• If then xz

y b

a

c µ

“c orthogonal to a and to b”“c has unit norm”

Page 11: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

11

Cross Product Identities

these follow from

Page 12: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

12

Normal Vectors

• Let be a surface (dimension 2)• For each surface point define

• A normal at is any such that for all

n

v

p q p

Page 13: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

13

Normals for Planes

• For a plane (2-flat), point doesn’t matter because

• Given with can compute a normal

• Can calculate u,v from 3 non-colinear points

xz

y

n

u

v

(vectors tangential to plane do not change with position)

xz

y

q

rp

Page 14: CS 3388 Working with 3D Vectors [Hill §4.1—4.4] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A x z y (1,2,0)

14

Calculating a Normal

• Let define a plane

xz

y

q

r p

“Calculemus!”---Leibniz

(i.e. do it on blackboard)

xz

y

n