CSE169_02

CSE169_02 - Linear Algebra Review CSE169: Computer...

This preview shows pages 1–22. Sign up to view the full content.

Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Coordinate Systems x y z Right handed coordinate system
Vector Arithmetic [ ] [ ] [ ] [ ] [ ] [ ] z y x z y x z z y y x x z z y y x x z y x z y x sa sa sa s a a a b a b a b a b a b a b a b b b a a a = - - - = - - - - = - + + + = + = = a a b a b a b a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Vector Magnitude The magnitude (length) of a vector is: Unit vector (magnitude=1.0) 2 2 2 z y x v v v + + = v v v
Dot Product θ cos b a b a b a = = + + = i i z z y y x x b a b a b a b a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example: Angle Between Vectors How do you find the angle θ between vectors a and b ? a b θ
Example: Angle Between Vectors = = = - b a b a b a b a b a b a 1 cos cos cos θ a b θ

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Dot Products with Unit Vectors b θ a a·b = 0 0 < a·b < 1 a·b = -1 a·b = 1 -1 < a·b < 0 ( 29 θ cos 0 . 1 = = = b a b a a·b
Dot Products with Non-Unit Vectors If a and b are arbitrary (non-unit) vectors, then the following are still true: If θ < 90º then a · b > 0 If θ = 90º then a · b = 0 If θ > 90º then a · b < 0

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Dot Products with One Unit Vector a u a·u If | u |=1.0 then a · u is the length of the projection of a onto u
Example: Distance to Plane A plane is described by a point p on the plane and a unit normal n . Find the distance from point x to the plane p n • x

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example: Distance to Plane The distance is the length of the projection of x - p onto n : p n • x x-p ( 29 n p x - = dist
Cross Product [ ] x y y x z x x z y z z y z y x z y x b a b a b a b a b a b a b b b a a a k j i - - - = × = × b a b a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Properties of the Cross Product b a b a b a b a b a × = × = × = × 0 sin θ area of parallelogram ab is perpendicular to both a and b , in the direction defined by the right hand rule if a and b are parallel
Example: Area of a Triangle Find the area of the triangle defined by 3D points a , b , and c a b c

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example: Area of a Triangle ( 29 ( 29 a c a b - × - = 2 1 area b-a c-a a b c
Example: Alignment to Target An object is at position p with a unit length heading of h . We want to rotate it so that the heading is facing some target t . Find a unit axis a and an angle θ to rotate around. p h t

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example: Alignment to Target p h t t-p θ a ( 29 ( 29 ( 29 ( 29 - - = - × - × = - p t p t h p t h p t h a 1 cos θ
Trigonometry 1.0 cos θ sin θ θ cos 2 θ + sin 2 θ = 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document