lect04_PointsVectors

# lect04_PointsVectors - Points and Vectors Same...

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

1 CSE452 Lecture 4: Points, Vectors and shapes Slide 1 CSE452 Computer Graphics Lecture 4: Points, Vectors and Shapes CSE452 Lecture 4: Points, Vectors and shapes Slide 2 Points and Vectors Points and Vectors Same representation Different meaning: Point: a fixed location (relative to {0,0}) Vector: a direction and length can be translated to anywhere 8 x, y <H or 8 x, y, z <L x Y p = 8 1, 2 < 1 2 v = 8 1, 2 < p = 8 2, 2 < 2 CSE452 Lecture 4: Points, Vectors and shapes Slide 3 Point Operations Point Operations Subtraction Result is a vector Addition with a vector Result is a point Can two points add? Not yet… p 1 p 2 v p1 + v = p2 = 9 p1 x + vx,p1 y + vy = p2 p1 = v = 9 p2 x p1 x ,p2 y p1 y = CSE452 Lecture 4: Points, Vectors and shapes Slide 4 Vector Operations Vector Operations Addition/Subtraction Result is a vector Scaling Result is a vector Magnitude A unit vector : v1 ± v2 = 9 v1 x ± v2 x ,v1 y ± v2 y = s v = 8 s vx,s vy < v1 v2 1 + 2 v1 v2 » v » = " vx 2 + vy 2 v s v » v » = 1 CSE452 Lecture 4: Points, Vectors and shapes Slide 5 Vector Operations Vector Operations Dot product Result is a scalar In coordinates v 1 v 2 = » v 1 »» v 2 » Cos @ α D v1 v2 = v1 x v2 x + v1 y v2 y v 1 v 2 α CSE452 Lecture 4: Points, Vectors and shapes Slide 6 Vector Operations Vector Operations Uses of dot products Computing angle between vectors Parallel : Orthogonal

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/03/2010 for the course CSE 451 taught by Professor Xu during the Spring '10 term at Washington University in St. Louis.

### Page1 / 5

lect04_PointsVectors - Points and Vectors Same...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online