Homework #1 Point Value: 20 points CS 184/284a: Foundations of Computer Graphics Spring 2013 Prof. James O’Brien page 1 of 3 Due Date: Sep. 13th, 5:00 pm UNIVERSITY OF CALIFORNIA UNIVERSITY OF CALIFORNIA Collegeof ofthis Engineering, Department of Electrical Engineering and Computer Sciences The purpose homework is to test your prerequisite math background. In general, you should find this assignment to Science be fairlyDivision: easy. This be doneofand solo. To submit, please slide under College of Engineering, Department of Electrical Engineering Computer Sciences Computer Fall assignment 2006 CS-184must Foundations Computer Graphics Prof. O’Brien’s door at 527 Soda Hall. Computer Science Division: Professor: Fall 2006 CS-184 Foundations of Computer Graphics James O’Brien Professor: James O’Brien Assignment 1 Introduction: Some of these questionsPoint mayvalue: look a40 little difficult. If they do, consider reviewing how dot Assignment pts 1 products and cross products are formed, how matrices are multiplied with vectors and with each other, Point value: 40 pts how determinants are formed and what eigenvalues are. This exercise could take a very long time if This homework must be done individually. Submission date is Friday, September 8th 2006, at you don’t think carefully about each problem, but good solutions will use one or two lines per question. 10:00am under the door 633 individually. Soda Hall This homework be of done date isand Friday, September 8tha 2006, at which Many textbooks must supply expressions for the Submission area of a triangle for the volume of pyramid, 10:00am theuseful. door of of 633 Soda Hall Introduction: Some these questions may look a little di⇥cult. If they do, consider reviewyou may under find very ing Introduction: how dot productsSome and cross products are formed, matrices are multiplied vectors and of these questions may lookhow a little di⇥cult. If they do, with consider reviewwith each other, how determinants are formed and what This exercise could take ing how dot products and cross products are formed, how eigenvalues matrices areare. multiplied with vectors and You must write neatly. If the assignment cannot beproblem, read, itbut cannot be graded. If use you find that you a very long time if you don’t think carefully about each good solutions will with each other, how determinants are formed and what eigenvalues are. This exercise couldabout take make a mess as you work outtextbooks the solution, thenexpressions you shouldfor use scrap paper for working it outthe and copy one line pertime question. Many supply a triangle a very long if you don’t think carefully about each problem,the butarea goodofsolutions willand usefor about it down neatly for turning in. If you are feeling particularly intrepid, consider formatting your solutions volume a pyramid, may findsupply very useful. one lineofper question.which Manyyou textbooks expressions for the area of a triangle and for the with LaTeX. If you are feeling particularly perverse, consider formatting your solutions using Microsoft’ volume a pyramid, youIfmay very useful. Youofmust write which neatly. thefind assignment cannot be read, it cannot be graded. If Word’s equation editor. youYou find must that you make a messIfasthe youassignment work out the solution, should use paper write neatly. cannot be then read,you it cannot be scrap graded. If Ifor know that it many of you have access to solutions to in. this,Ifor a very similarparticularly assignmentintrepid, from previous working out and copy it down neatly for turning you are feeling you find that you make a mess as you work out the solution, then you should use scrap paper years. Toformatting be honest, if you need to cheat on this assignment then you should just go drop the class consider your solutions LATEfor X. for working it out and copy it downwith neatly turning in. If you are feeling particularly intrepid, now. A consider formatting your L Tto I know that many of solutions you have with access solutions to this, or a very similar assignment from EX. previous years. To be honest, if you need to cheat on this assignment then just go drop the from class I know that many of you have access to solutions to this, or a very similar assignment now. previous years. To be honest, if you need to cheat on this assignment then just go drop the class now.Question 1: Two vectors in the plane, i and j, have the following properties (i · i means the dot Question product between i and i): i in · i the = 1,plane, i · j = i0,and j · jj,=have 1. the following properties (i · i means the 1: Two vectors dot product between i and i): i · i = 1, i · j = 0, j · j = 1. 1. Is there a vector k, that is not equal to i, such that: k · k = 1, k · j = 0? What is it? Are many vectors 1. there Is there a vector k, with that these is notproperties? equal to i, such that: k · k = 1, k · j = 0? What is it? Are many vectors with that: these kproperties? 2. there Is there a vector k such · k = 1, k · j = 0, k · i = 0? Why not? 2. If Is ithere vector k suchinthat: k · kwould = 1, kthe ·j= 0, k · i to = the 0? Why 3. and ja were vectors 3D, how answers abovenot? questions change? 3. If i and j were vectors in 3D, how would the answers to the above questions change? Question 2: For three points on the plane (x1 , y1 ), (x2 , y2 ) and (x3 , y3 ) show that the determinant of Question 2: For three points on the plane (x1 , y1⇥ ), (x2 , y2 ) and (x3 , y3 ) show that the deterx1 y1 1 minant of ⇥ ⌃ ⇧ x12 yy12 1 ⇤ x 1 ⌅ ⇧ x3 y3 1 ⌃ ⇤ x2 y2 1 ⌅ x3 ycorners 3 1 is proportional to the area of the triangle whose are the three a line, to what theofvalue of the determinant? thisthree give is straight proportional theisarea the triangle whose cornersDoes are the three points lie on a line? Why do you think so? a straight line, what is the value of the determinant? Does this give points. If these points lie on a usefulIftest to points tell whether points. these lie on a useful test to tell whether three points lie on a line? Why do you think so? Question 3: The equation of a line in the plane is ax + by + c = 0. Given two points on the plane, show how3:toThe findequation the values a, b,inc for lineisthat thosetwo twopoints points. Question of of a line the the plane ax +passes by + cthrough = 0. Given onYou the may find the answer to question 2 useful here. plane, show how to find the values of a, b, c for the line that passes through those two points. You mayQuestion find the answer useful 4: Lettoequestion e2 =here. (0, 1, 0), e3 = (0, 0, 1). Show that if {i, j, k} is {1, 2, 3}, 1 = (1, 0,20), {2, 3, 1}, or {3, 1, 2}, then e ⇤ e = e , where is e the cross product. Now show that if {i, j, k} is Question 4: Let e1 =i (1, 0,j 0), ek2 = (0, 1,⇤0), 3 = (0, 0, 1). Show that if {i, j, k} is {1, 2, 3}, {1, 3, 3, 1}, 2}, {3, 2, 1} or {2, 1, 3}, ej = e⇤k .is the cross product. Now show that if {i, j, k} is {2, or {3, 1, 2}, then ei ⇤then ej =eie⇤ k , where {1, 3, 2}, {3, 2, 1} or {2, 1, 3}, then ei ⇤ ej = ek . Question 2: For three points on the plane (x1 , y1 ), (x2 , y2 ) and (x3 , y3 ) show that the determinant of Question 2: For three points on the plane (x1 , y1⇥ ), (x2 , y2 ) and (x3 , y3 ) show that the deter- x1 y1 1 ⇥ ⌃ 1 ⌅ Foundations of Computer Graphics page 2 of 3 1 ⌃ ⌅ Springx 2013 Point Value: 20 points 3 y 3 1 is proportional to the area of the triangle whose corners are the three points. If these points lie on Prof. James O’Brien Due Date: Sep. 13th, 5:00 pm a straight line, to what theofvalue of the determinant? thisthree give points. a usefulIftest to points tell whether is proportional theisarea the triangle whose cornersDoes are the these lie on points lie what on a line? so? athree straight line, is theWhy valuedoofyou thethink determinant? Does this give a useful test to tell whether three points lie 3: on The a line? Why do think so?plane is ax + by + c = 0. Given two points on the Question equation of you a line in the minant of Homework #1 ⇧ ⇤ x12 y12 ⇧ x y CS 184/284a: ⇤ 23 3 2 plane, show how3:toThe findequation the values a, b,inc for lineisthat thosetwo twopoints points. Question of of a line the the plane ax +passes by + cthrough = 0. Given onYou the may find the answer to question 2 useful here. plane, show how to find the values of a, b, c for the line that passes through those two points. You mayQuestion find the answer useful 4: Lettoequestion = (1, 0,20), e =here. (0, 1, 0), e = (0, 0, 1). Show that if {i, j, k} is {1, 2, 3}, 1 2 3 {2, 3, 1}, or {3, 1, ei (1, ⇤ e0,j 0), = eek2, where is ethe j,2, k}3}, is Question 4:2}, Letthen e1 = = (0, 1,⇤0), (0, 0,product. 1). ShowNow thatshow if {i,that j, k}ifis{i, {1, 3 =cross {1, 3, 1}, 2}, {3, 2, 1} or {2, 1, 3}, {2, or {3, 1, 2}, then ei ⇤then ej =eie⇤ ⇤k .is the cross product. Now show that if {i, j, k} is j = e k , ewhere {1, 3, 2}, {3, 2, 1} or {2, 1, 3}, then ei ⇤ ej = ek . Question 5: For four points in space (x1 , y1 , z1 ), (x2 , y2 , z2 ), (x3 , y3 , z3 ), (x4 , y4 , z4 ) show that the Question determinant5:ofFor four points in space ⇤ (x1 , y1 , z1 ), (x2 ,⌅y2 , z2 ), (x3 , y3 , z3 ), (x4 , y4 , z4 ) show that x1 x2 x3 x4 , y , z ), (x , y , z ), (x , y , z ) show that Question 5: For four points in space 2 2 2 3 3 3 4 4 4 the determinant of ⇤ ⌥ y(x1 ,yy1 , zy1 ), (x y44 ,⌅y , z ), (x , y , z ), (x , y , z ) show that ⌥ 11 1 x x , y221 , zx133), (x the Question determinant5:ofFor four points in space ⇤ 2 ⌅2 2 3 3 3 4 4 4 ⌥ x(x ⌥ ⇧ x yz11 x yz22 x yz33 x yz44 ⌃ ⌥ ⇤ ⌅ ⌥ x 1 1 1 yz11 x yz22 x yz33 x yz144 ⌃ ⌥ ⇧ ⌥ yz13 yz14corners ⇧ ⌃ z1 yz12 whose ⌥ y is proportional to the volume of the tetrahedron are the four points. If these points ⌥ 1 ⇧ ⌃ z z z z 1 1 1 1 1 2 3 4 lie on a plane, what is the value of the determinant? Does this give a useful test to tell whether the determinant of is proportional to the volume of the tetrahedron 1 think 1 whose 1 so?1corners are the four points. If these points four points a plane? Why dodeterminant? you is to lie theon of the tetrahedron whose corners thea four points. If tell these points lieproportional ongiven a plane, what isvolume the value of the Does thisare give useful test to whether is proportional to lie the of the tetrahedron whose corners the If tell these points lie on a plane, what isvolume the value ofathe Does this give useful test to whether four given points on a plane? Why dodeterminant? you think so?ax Question 6: The equation of plane in space is + by +are cz + da four = 0. points. Given three points in lie on a plane, what is the value of the determinant? Does this give a useful test to tell whether four given points lie on a plane? Why do you think so? space, show how to find the values of a, b, c, d for the plane that passes through those three points. Question 6:lieThe of a plane in space + by + cz + d = 0. Given three points in four givenfind points on equation a plane? Why you think is so?ax You may the to values question 4do useful here. Question 6:toanswer The of a a, plane ax + that by + passes cz + d through = 0. Given three points in space, show how findequation the of b, c,ind space for theisplane those three points. Question 6: The equation of a plane in space is ax + by + cz + d = 0. Given three points in space, show how to find the values of a, b, c, d for the plane that passes through those three points. 7: answer Let p0 , to p1question , p2 be three distinct YouQuestion may find the 4 useful here.points in space. Now consider the cross product space, show how to find the values of a, b, c, d for the plane that passes through those three points. You may find the answer to question 4 useful here. n =Question (p0 p1 ) ⇥7:(pLet p2,).pWhat does thisdistinct vector points mean geometrically? Let p be the anycross pointproduct on the 0 p , p2 be three in space. Now consider 0 to 1question You may find the answer 4 useful here. plane p0Let , p1p isthis the geometric relationship between p cross p0 (look at , p1p, 2p;2what be three distinct points in space. Now consider product n =Question (pformed p1 )by ⇥7:(p p0and does vector mean geometrically? Let n p and be the any point on the 0 0 2 ). What the dot product)? Show that, if p = (x, y, z) the equation of the plane must be n.(p p ) = 0. Question 7: Let p , p , p be three distinct points in space. Now consider the cross product n = (p p ) ⇥ (p ). What does this vector mean geometrically? Let p be any point on the 0 1p ; 2what is the geometric relationship between n and p 0 1 by p00, p1 0 2 plane formed and p0 (look at 2 n = (p p ) ⇥ (p p ). What does this vector mean geometrically? Let p be any point on0.the plane formed by p , p and p ; what is the geometric relationship between n and p p at 0 1 0 2 0 1 2 8: Suppose that a square matrix, and of itsthe inverse transpose and are the Question dot product)? Show that, if A p =is (x, y, z) the equation planeand must be n.(p exist, p00 )(look = plane formed by p , p and p ; what is the geometric relationship between n and p p (look at the dot product)? Show that, if p = (x, y, z) the equation of the plane must be n.(p ) = 0. 0 1 2 0 equal; a matrix 8: with these properties called an orthonormal matrix.and Show that, forexist, any0 angle Question Suppose that A is (x, ais square matrix, and of itsthe inverse transpose and are, the dot product)? Show that, if p = y, z) the equation plane must be n.(p p ) = 0. 0 and are the Question matrix M( ), defined bythat the A array is orthonormal. Suppose is aisbelow, square matrix, and its inverse transpose equal; a matrix 8: with these properties called an orthonormal matrix.and Show that, forexist, any angle , Question Suppose that is aisbelow, square matrix, and transpose and are, equal; a matrix with theseby properties called is an orthonormal matrix.and Show that, forexist, any angle ⇥ its inverse the matrix M( 8: ), defined the A array orthonormal. cosis sin equal; a matrix with theseby properties called anorthonormal. orthonormal matrix. Show that, for any angle , the matrix M( ), defined the arrayisbelow, ⇥ sin cos the matrix M( ), defined by the array below, cosis orthonormal. sin ⇥ cos sin ⇥ sin cos Show also that M( 1 + 2 ) = M( 1 )M( 2 );cos use sinto argue that the inverse of M( ) is M( ). sin this cos Finally, for the point p = (0, 1), what geometrical figure is given by taking the points given by sin this cos Show also that M( 1 + 2 ) = M( 1 )M( 2 ); use to argue that the inverse of M( ) is M( ). M( )p for every possible value of ? Show also that M( + ) = M( )M( ); use this to argue that the inverse the of M( ) is given M( by ). 1 2 1 2 Finally, for the point p = (0, 1), what geometrical figure is given by taking points Show also that M( + ) = M( )M( ); use this to argue that the inverse of M( ) is M( ). Finally, for the point p = (0, 1), what geometrical figure is given by taking the points given by 1 2 1 2 You arevalue givenoffour M( Question )p for every9:possible ? vectors in the plane, x1 and x2 , b1 and b2 , and you are told Finally, for the point p = (0, 1), what geometrical figure is given by taking the points given by M( )p for every possible value of ? that there is a matrix M such that Mx1 = b1 and Mx2 = b2 . Now if you are given a vector x3 , 9:possible You arevalue givenoffour in the plane, x1 and x2 , b1 and b2 , and you are told M( Question )p ? vectors how do for youevery determine ? (hint: howin tothe findplane, out what M is the data, andyou then 3given x2from , b1 and b2 , and areapply told 9: YouMx aresuch fourshow vectors x1 and thatQuestion there is a matrix M that Mx = b 1 1 and Mx2 = b2 . Now if you are given a vector x3 , it toQuestion x3 ). is a matrix and x , b and b , and you are told 9: You M aresuch giventhat fourMx vectors in the plane, x that there = b and Mx = b . Now if you are given a vector x3 , 12 1 2 how do you determine Mx3 ? (hint: show1 how 1to find out2 what M is 2from the data, and then apply that there is a matrix M such that Mx = b and Mx = b . Now if you are given a vector x3 , how do you determine Mxdown show1 how 1toequation find out2ofwhat M is from then apply 3 ? (hint: 10: Write the parametric the2 points on athe linedata, that and passes through it toQuestion x3 ). how do youin determine show how to find out what M is from the data, and then apply it topoints x3 ). 3 ?p(hint: and two space, p1Mx 2 ; now write down the parametric equation of the points on a plane Question 10: Write down the parametric equation of the points on a line that passes through it to x ). 3 that contains these points and aparametric third point, p3 . Show howpoints to useonthese parametric equations 10: two Write down of the line that passes p2 ; the now write downequation the parametric equationa of the points on through a plane twoQuestion points in space, p1 and andQuestion some inequalities the todown specify (a) all points onathe line that lie between 10: Write down equation of the points on line that passes through pparameters ; the nowaparametric write the equation of the points on a plane two in these space, p1onand 2 and that points contains two points third point, p3 . parametric Show how to use these parametric equations p1 and p2 and (b) all points onathe triangle vertices p1 , these p2 of and p3points . and p2 and ; now write down whose the equation the on a plane two points in these space, p1the that contains two points third point, p3 . parametric Show howare to use parametric equations and some inequalities on the parameters to specify (a) all the points on the line that lie between that contains these two and a third p3 .(a) Show how to useon these equations andQuestion some inequalities on parameters topoint, specify allhas the points the parametric line between and ⇥lie 11: all Mthe ispoints athe symmetric 2x2 matrix. It two ⇥03 .that 1. p1 and p2 and (b) points on thereal triangle whose vertices areeigenvalues, p1 , p2 and p and some on the parameters to specify (a) vertices all the points p1 and p2 inequalities and (b) all the points on the triangle whose are p1 ,on p2the andline p3 .that lie between Question 11: all M is apoints symmetric real 2x2 matrix. It has two ⇥03 .and ⇥1 . p1 and (b) on the triangle whose vertices areeigenvalues, p , px2T and T 2 and •Question If p both eigenvalues positive, show for any 2D vector 0 1⌅ Mx p ⌅0 (max(⇥ and ⇥1 .0 , ⇥1 ))x x. 11: Mthe isare a symmetric realthat, 2x2 matrix. It has twox,eigenvalues, ⇥ Question 11: M is a symmetric real 2x2 matrix. It has two eigenvalues, ⇥0 and ⇥1 . the Question dot product)? Show that, if A p =is (x, y, z) the equation plane must be n.(p exist, p )and = 0.are Suppose that ais square matrix, and of itsthe inverse transpose equal; a matrix 8: with these properties called an orthonormal matrix.and Show that, for any0 angle , equal; a matrix with these properties is called an orthonormal matrix. Show that, for any angle Supposebythat is a below, square is matrix, and its inverse and transpose exist, and are, the Question matrix M( 8: ), defined the A array orthonormal. the matrix M( ), defined by the array below, is orthonormal. equal; a matrix with these properties is called an orthonormal matrix. Show that, for any angle , ⇥ ⇥ cos sin the matrix M( ), defined by the arrayCS below, is orthonormal. 184/284a: Foundations of Computer Graphics page 3 of 3 cos sin sin cos Springsin 2013 cos ⇥ Point Value: 20 points cos sin Prof.);James O’Brien Show also that M( 1 )M( to argue that the inverse of M( ) is M( ). sin this cos Due Date: Sep.M( 13th, pm 1 +5:00 2) = 2 use Show also that M( + ) = M( )M( ); use this to argue that the inverse the of M( ) is given M( by ). 1 p = 2 (0, 1), what 1 2 Finally, for the point geometrical figure is given by taking points Finally, forthat the M( point p =) (0, 1), geometrical figure is given by taking the points given by Show)palso = M( ). M( for every possible of what 1 + 2value 1?)M( 2 ); use this to argue that the inverse of M( ) is M( M( )p for every possible value of ? Finally, for the point p = (0, 1), what geometrical figure is given by taking the points given by Question 9: You are given four vectors in the plane, x1 and x2 , b1 and b2 , and you are told M( Question )p for every9:possible offour ? vectors in the plane, x1 and x2 , b1 and b2 , and you are told You M arevalue giventhat that there is a matrix such Mx1 = b1 and Mx2 = b2 . Now if you are given a vector x3 , thatQuestion there a matrix M that Mx = bin Mx =x1b2and .MNow a then vector x3 , 1 how 1toand x2from , ifb1you and b2given , and areapply told 9: YouMx aresuch given four vectors the how do youisdetermine ? (hint: show findplane, out2 what is theare data, andyou 3 how do you determine Mx ? (hint: show how to find out what M is from the data, and then apply 3 that that Mx1 = b1 and Mx2 = b2 . Now if you are given a vector x3 , it to there x3 ). is a matrix M such it to x ). 3 howQuestion do you determine Mxdown show how toequation find outofwhat M is from then apply 3 ? (hint: 10: Write the parametric the points on athe linedata, that and passes through it to x ). Question 10: Write down the parametric equation of the points on a line that passes through 3 two points in space, p1 and p2 ; now write down the parametric equation of the points on a plane p2 and ; the nowaparametric write downequation the equation the points on a plane two points in these space, p1 and 10: two Write down of the a of line that passes through thatQuestion contains points third point, p3 . parametric Show howpoints to useonthese parametric equations that contains these two points and a third point, p . Show how to use these parametric equations 3 the(a) parametric equation of the onbetween a plane two in space, p1onand and points some inequalities thepparameters specify all the points on the linepoints that lie 2 ; now writetodown and some inequalities on the parameters to specify (a) all the points on the line that lie between that contains these two points and a third point, p . Show how to use these parametric equations p1 and p2 and (b) all the points on the triangle whose vertices are p1 , p2 and p3 . 3 p p2 inequalities and (b) all the points on the triangle whose vertices are p1 ,on p2the andline p3 .that lie between 1 and and some on the parameters to specify (a) allhas thetwo points Question 11: M is a symmetric real 2x2 matrix. It eigenvalues, ⇥0 and ⇥1 . p1 and p2 and (b) on thereal triangle whose vertices areeigenvalues, p1 , p2 and p Question 11: all Mthe is apoints symmetric 2x2 matrix. It has two ⇥03 .and ⇥1 . Homework #1 and ⇥1 .0 , ⇥1 ))xT x. 11: M isare a symmetric realthat, 2x2 matrix. It has twox,eigenvalues, •Question If both eigenvalues positive, show for any 2D vector 0 ⌅ xT Mx ⇥ ⌅0 (max(⇥ • If both eigenvalues are positive, show that, for any 2D vector x, 0 ⌅ xT Mx ⌅ (max(⇥0 , ⇥1 ))xT x. • one eigenvalue zero, show that vector x ⇧=x,00such = 0. , ⇥ ))xT x. • If If both eigenvaluesis positive, showthere that, is forsome any 2D vector ⌅ xTthat Mx Mx ⌅ (max(⇥ • If one eigenvalue isare zero, show that there is some vector x ⇧= 0 such that Mx = 0. 0 1 • one eigenvalue eigenvalue is is zero, positive and onethere is negative, is that someMx vector ⇧= 0 such •• If If one show that is some show vectorthat x ⇧=there 0 such = 0.x If one eigenvalue is positive and one is negative, show that there is some vector x ⇧= 0 such T that xT Mx = 0 that Mx = 0 is positive and one is negative, show that there is some vector x ⇧= 0 such • If onex eigenvalue • A matrix definite if, for any vector x, xTT Mx > 0. Assume that M is T that x MxM = is 0 positive • symmetric, A matrix M is positive definite if, What for any x, about x Mxits>eigenvalues? 0. Assume that M is real, and positive definite. canvector you say real, and positive definite. canvector you say • symmetric, A matrix M is positive definite if, What for any x, about xT Mxits>eigenvalues? 0. Assume that M is symmetric, real, and positive definite. What can you say about its eigenvalues? Question 12: M is a 2x2 matrix. • Show that the eigenvalues of M are the roots of the equation 2 trace(M) + det(M) = 0. Something Optional: +5 pts If you decide to continue into graduate school, you will most likely have to write papers about your graduate research work. If these papers contain any math, you will need to set your equations using a tool like LATEX, Mathematica, or MS Word’s Equation Editor. (Listed in order of my own preference.) If you use one of these tools (or something similar) to write up the solutions to at least 4 questions, you will get two extra credit points on this assignment. If you do the entire assignment with the tool you will get a total of five points extra. My personal preference is for LATEXbecause it produces the nicest looking output. LATEX’s downside is that it is hard to learn, although once learnt it is fast to use. Mathematica and Word
© Copyright 2025