DOC PREVIEW
UCSD CSE 167 - Review

This preview shows page 1-2-3-4-27-28-29-30-56-57-58-59 out of 59 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 59 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ReviewCSE167: Computer GraphicsInstructor: Steve RotenbergUCSD, Fall 2005FinalThe final is on Tuesday, December 6From 11:30-2:30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 OpenGLTopicsThe final will have geometry problems similar to those in the midtermThere will be some mathematical questions about curved surfaces and ray tracing (lectures 12, 13, & 16)I suggest studying lectures 12, 13 & 16 well, as I might ask about anything from those (you don’t have to memorize the Fresnel equations, but you should know what they are for)There will not be any math questions about BRDFs, the ‘Rendering Equation’, or global illumination, but I expect you to be familiar with the concepts of these thingsThere will be conceptual questions about scene management and modelingThere will also be mathematical and conceptual questions from things covered in the first half of the class (traditional graphics pipeline)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•pn• xExample: Distance to PlaneThe distance is the length of the projection of x-p onto n :•pn• xx-p( )npx⋅−=distExample: Target ‘Lock On’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.M• tExample: Target ‘Lock On’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.abcd• tExample: Target ‘Lock On’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 )( )°<−⋅−−10cos1tdctdif( )985.0>−⋅−tdctdifExample: Target ‘Lock On’We can even speed that up further by removing the division and the square root in the magnitude computation:All together, this requires 8 multiplications and 8 adds( )( )( )22*970.0 tdctd−>⋅−ifExample: Camera ‘Look At’Our eye is located at position e and we want to look at a target at position t. Generate an appropriate camera matrix M.Example: Camera ‘Look At’Our eye is located at position e and we want to look at a target at position t. Generate an appropriate camera matrix M.Two possible approaches include:Measure angles and rotate matrix into placeConstruct a,b,c, & d vectors of M directlyExample: Camera ‘Look At’Method 1: Measure Angles & RotateMeasure Angles:Tilt angleHeading anglePositionConstruct matrix by starting with the identity, then apply tilt and heading rotationsExample: Camera ‘Look At’Method 2: Build Matrix DirectlyThe d vector is just the position of the camera, which is e:The c vector is a unit length vector that points directly behind the viewer:tetec−−=ed=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:cycya××=[ ] [ ]xzcc−=×0010 cExample: Camera ‘Look At’Method 2: Build Matrix DirectlyThe b vector is a unit length vector that points up relative to the viewer. It is perpendicular to the both the c and a axesNote that b does not need to be normalized because it is already unit length. This is because a and c are unit length vectors 90 degrees apart.acb×=1*1*190sin=°=acbExample: Camera ‘Look At’Method 2: Build Matrix DirectlySummary:acb×=tetec−−=ed=cycya××=Position Vector Dot Matrixzzzzyzxzyyzyyyxyxxzxyxxxzyxzzzzyyyyxxxxdcvbvavvdcvbvavvdcvbvavvvvvdcbadcbadcba+++=′+++=′+++=′⋅=⋅=′11000vMvdcbav+++=′zyxvvvPosition Vector Dot Matrixdcbav+++=′zyxvvvv=(.5,.5,0,1)xyLocal Space(0,0,0)Position Vector Dot Matrixdcbav+++=′zyxvvvv=(.5,.5,0,1)xyLocal Space(0,0,0)xyWorld Space(0,0,0)abdMatrix MPosition Vector Dot Matrixdcbav+++=′zyxvvvv=(.5,.5,0,1)xyLocal Space(0,0,0)xyWorld Space(0,0,0)abdv’Position vs. Direction VectorsVectors representing a position in 3D space are expanded into 4D as:Vectors representing direction are expanded as:[ ]1zyxvvv[ ]0zyxvvvDirection Vector Dot Matrixcbavzyxvvv++=′zzzyzxzyzyyyxyxzxyxxxzyxzzzzyyyyxxxxcvbvavvcvbvavvcvbvavvvvvdcbadcbadcba++=′++=′++=′⋅=⋅=′01000vMvThe abcd vectors of M’ are the abcd vectors of M transformed by matrix NNotice that a, b, and c transform as direction vectors and d transforms as a positionMatrix Dot Matrix=1000zzzzyyyyxxxxdcbadcbadcbaMMNM⋅=′IdentityTake one more look at the identity matrixIt’s a axis lines up with x, b lines up with y, and c lines up with zPosition d is at the originTherefore, it represents a transformation with no rotation or translation=1000010000100001ILinear InterpolationLinear interpolation (Lerp) is a common technique for generating a new value that is somewhere in between two other valuesA ‘value’ could be a number, vector, color, or even something more complex like an entire 3D object…Consider interpolating between two points a and b by some parameter t( ) ( )baba tttLerp+−=1,,abt=1..0<t<1t=0de Casteljau Algorithmp0p1p2p3We start with our original set of pointsIn the case of a cubic Bezier curve, we start with four pointsde Casteljau Algorithmp0q0p1p2p3q2q1( )( )( )322211100,,,,,,ppqppqppqtLerptLerptLerp===de Casteljau Algorithmq0q2q1r1r0( )( )211100,,,,qqrqqrtLerptLerp==de Casteljau Algorithmr1xr0•( )10,, rrx tLerp=Bezier Curvex•p0p1p2p3Recursive Linear Interpolation( )( )( )322211100,,,,,,ppqppqppqtLerptLerptLerp===( )( )211100,,,,qqrqqrtLerptLerp==( )10,, rrx tLerp=3210pppp210qqq10rrx3210ppppExpanding the Lerps( ) ( )( ) ( )( ) ( )(


View Full Document

UCSD CSE 167 - Review

Documents in this Course
Lighting

Lighting

38 pages

Surfaces

Surfaces

22 pages

Review

Review

110 pages

Midterm

Midterm

4 pages

Lighting

Lighting

38 pages

Lighting

Lighting

71 pages

Review

Review

110 pages

Lighting

Lighting

71 pages

Load more
Download Review
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Review and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Review 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?