Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS1550 Fundamentals For Computer Graphics Vectors-2

Similar presentations


Presentation on theme: "CS1550 Fundamentals For Computer Graphics Vectors-2"— Presentation transcript:

1 CS1550 Fundamentals For Computer Graphics Vectors-2
Sumanth Shankar California State University, Los Angeles

2 Scalar Dot Product The dot symbol ‘.’ is used to represent scalar multiplication. r = ai + bj + ck and s = di + ej + fk |s| . |r| cos(ℬ) = ad + be + cf The angle between (i.i), (j.j) and (k.k) is 0 degree and between others is 90 degrees.

3 Dot product to calculate angle
To find the angle between two vectors r and s r = 2 −3 4 and s =

4 Dot product in light calculation
The light source is located at (0, 10, 0) and the illuminated point is (20, 20, 40) To calculate light source we need unit vector n =

5 Dot product in light calculation
We need to calculate vector. For light intensity do not calculate angle.

6 Dot product in back-face detection
To detect visibility of a polygon If the angle is less than 90 degrees the polygon is visible. If the angle is equal to or grater than 90 degrees the polygon is invisible. Let the source be (10, 10, 40) and (0, 0, 0)

7 Dot product in back-face detection
The vector is n = −2

8 Calculating areas


Download ppt "CS1550 Fundamentals For Computer Graphics Vectors-2"

Similar presentations


Ads by Google