



















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















































CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005
The final is on Tuesday, December 6 (^) From 11:30-2: Center Hall, room 105 (^) It will cover material from the entire quarter It will be similar to the midterm, but with 20 questions (^) There will not be any questions on C++ or OpenGL
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
- x
- x
For an airplane to get a missile locked on, the target must be within a 10 degree cone in front of the plane. If the plane’s matrix is M and the target position is t , find an expression that determines if the plane can get a lock on. a b c d
We want to check the angle between the heading vector (- c ) and the vector from d to t: (^) We can speed that up by comparing the cosine instead ( cos(10°)=.985 )
−
1
( )
Measure angles and rotate matrix into place (^) Construct a , b , c , & d vectors of M directly
Example: Camera ‘Look At’ Method 2: Build Matrix Directly
Example: Camera ‘Look At’ Method 2: Build Matrix Directly (^) The a vector is a unit length vector that points to the right of the viewer. It is perpendicular to the c axis. To keep the camera from rolling, we also want the a vector to lay flat in the xz-plane, perpendicular to the y-axis. (^) Note that a cross product with the y-axis can be optimized as follows:
[ ] [ ] z x
Example: Camera ‘Look At’ Method 2: Build Matrix Directly
z x z y z z z z y x y y y z y y x x x y x z x x z y x z z z z y y y y x x x x v v a v b v c d v v a v b v c d v v a v b v c d v v v a b c d a b c d a b c d ′ = + + +
v M v
x y z
v ′^ = a + b + c + d x y z v v v v=(.5,.5,0,1) x y Local Space (0,0,0) x y World Space (0,0,0) a b d Matrix M
v ′^ = a + b + c + d x y z v v v v=(.5,.5,0,1) x y Local Space (0,0,0) x y World Space (0,0,0) a b d v ’