Mathematical Structures for Computer Graphics Steven J. Janke John Wiley & Sons, 2015 ISBN: 978-1-118-71219-1 Updated /17/15 Exercise Answers Chapter 1 1. Four right-handed systems: ( i, j, k), ( i, j, k), ( i, j, k), ( i, j, k) 2. The diagonal divides each of the smaller squares into two triangles congruent to the original. The larger squares is divided by two diagonals into four of the original triangles.. (Use similar triangles.) 4. Distance = 5. ABC = 80.40, ACB = 48.99, BAC = 50.61 In radians: ABC = 1.40, ACB = 0.86, BAC = 0.88 6. None are right triangles. 7. a.) Perpendicular bisector of P 0 P 1. b.) Center of circumscribed circle. 8. Square surrounding given square with rounded corners. 9. For example: (8,15,17) and (5, 12, 1) 10. (s 2 t 2 ) 2 + (2st) 2 = (s 2 + t 2 ) 11. (2, ) becomes ( 5 2, 1 12. (x, y) becomes ( x+1 2, y 6 1. A is still in the upper semicircle in Fig. 1.10. CDB is still a right triangle. CDB still equals α. 1
14. The altitude goes from vertex A to side a dividing it into two parts: c cos β and b cos γ. Also, α = π (β + γ), so sin α = sin(β + γ). The Law of Sines finishes the derivation. Chapter 2 1. Midpoint = (110, 125) 2. A = (80, 00) P 1 = (154, 252) P 2 = (228, 204) P = (02, 156) P 4 = (76, 108) B = (450, 60). DE = 8.60 DF = 4.47 EF = 10.0 EF D = 55.62 DEF = 25.41 EDF = 98.97 4. v = w = 2 D 1 = v + w = (1 + 2, 1) D 2 = w v = ( 2 1, 1) D 1 D 2 = 1 1 = 0 2
5. AB = (10, 2) BC = ( 1, 5) CD = ( 10, 2) DA = (1, 5) AB BC = 10 + 10 = 0 AB CD = 10 10 = 0 CD DA = 10 + 10 = 0 DA AB = 10 10 = 0 6. Center = (7.5, 4.5) 7. P = Midpoint of BC = 1 2 B + 1 2 C and M = A + 2 (P A) 8. v ( r + s) = (v 1, v 2 ) (r 1 + s 1, r 2 + s 2 ) = v 1 (r 1 + s 1 ) + v 2 (r 2 + s 2 ) =... 9. w = 29 1 54 (2, 7) + 54 (8, 1) 10. w = v with diagonals ( v+ w) and ( v w). Finally, ( v+ w) ( v w) = 0. 11. c 2 = (x 1 x 2 ) 2 + (y 1 y 2 ) 2 + (z 1 z 2 ) 2 = (x 2 1 + y 2 1 + z 2 1) + (x 2 2 + y 2 2 + z 2 2) 2 u w cos θ. Solve for the last term which is 2( u w). 12. cos θ = 0.48 = θ = 111.40. (Note that this is a little small for normal human vision.) 1. ST = 10.86 T U = 7.81 US = 7.68 SUT = 89.04 T SU = 45.96 ST U = 44.99 14. Area =.464. 15. A B = ( 16, 9, 10) A C = (17, 27, 4) A (B + C) = (1, 6, 14)
16. B C is perpendicular to B and to C. A (B C) is perpendicular to (B C) and therefore must be in the plane described by B and C. The x coordinate of A (B C) is a 2 (b 1 c 2 b 2 c 1 ) a (B c 1 b 1 c ) and this equals the x coordinate of (A C)B (A B)C. Similarly for the y and z coordinates. Chapter 1. P = (0.18, 1.67) 2. P = (8, 2 ) + t(11, ). Note direction vector could be ( 11, ).. Two possible answers: C = (.84, 47.8) or C = (48.16, 1.8) 4. P = P 0 + t v where P 0 = ( 8, 12, 7) or P 0 = ( 2, 1,.5). Direction vector v = ( 6, 1,.5). Any vector parallel to v also works. 5. 1x 11y + 21z = 78 6. Distance = 5.17 7. Distance = 9.82 8. (10, 12, 5) (P P 0 ) where P 0 = (19.51, 2.41, 9.76) or P 0 = ( 19.51, 2.41, 9.76). 9. All three planes contain A = (8,, 6) and have the form n i (P A) where n 1 = (2, 1, 1), n 2 = ( 8, 11, 5), n = ( 1,, 5). Vectors parallel to the n i will also work. 10. None of the pairs of line segments intersect. 11. The point (15, 16) is outside the triangle. 12. One possible algorithm: Test each of the two diagonals to find one such that the line containing it separates the other two vertices (each is on a different side of the line). If the quadrilateral is convex, both diagonals will satisfy the condition. The midpoint of the selected diagonal is inside the quadrilateral. 1. It intersects the plane at ( 0.615,.58, 5.692). 4
14. Medians intersect at (5, 2.67, 4). Distances:.62 (to C),.28 (to B), 2.60 (to A). 15. Intersects in the two points (7.785, 0.595, 1.0) and (.585,.195, 1.0). 16. Closest point of intersection is (6., 9., 11.9). 17. New center: (9.09, 7.977, 11.994). 18. Q = (.454, 0.66, 4.455) 19. Intersection: (1, 1, ). This point is inside the triangle. 20. Volume of tetrahedron = 1/6 2; Volume of parallelopiped = 1/ 2; Ratio = 1/6 21. i. Angle between faces = 70.5 ii. Distance between edges AB and CD = 1/ 2 iii. Length of altitude = 2/ iv. Angle between AB and face ACD = 54.74 22. Line = (6, 2, 46); Point of intersection = (51, 11, 26) 2. (a.) Normal to plane (Cartesian) = (4, 7, 2). (b.) Point of intersection (Cartesian) of three planes = ( 1.072, 1.471, 0.045) 24. Line of intersection: P = (8, 4, 0) + t(7, 9, 4) 25. Intersection point = (0.255, 0.46, 4.085) 26. Distance between lines = 1.0. Distance between segments = 5.16. 27. Angle with plane = 6.24. 28. Line: P = (51.99, 8.27, 0) + t(15, 7, 1) 29. Triangle area = 155. 0. Vector = ( 1, 20, 46) (or any multiple). 1. i. Multiplication/Division = 11; Addition/Subtraction = 1; Square roots = 5
ii. Multiplication/Division = 22; Addition/Subtraction = 22; Square roots = 0 2. Q 1 = (.722, 1.166, 8.278) and Q 2 = (10.06, 2.0, 5.112). Not coplanar. 4. 4 2 + 11 5 4 1 = 59 > 1 and 4 6 + 11 ( 2) 4 = 10 < 1. Therefore, they are on opposite sides of the line. Same idea in three dimensions. Chapter 4 1. [ ] 5/8 1/8 /2 1/2 2. A = ( 2, ), B = (5.07, 4.14), C = (6.49, 0.17). C = (7.54, 27.05) or C = (44.46, 11.05) 4. If B = (x 1, y 1 ) and C = (x 2, y 2 ), let P = [ ] x1 y 1. x 2 y 2 Then the area of ABC is one half the determinant, 1 2 det P. (This follows from the cross product ( B A) ( C A.) In general, if matrix M transforms the triangle, the area is 1 2 det MP = 1 2 det M det P = 1 2 det P. 5. (.71, 7.7) 6. (5.67, 0.67,.67) [ ] 1 0 7. Project onto x-axis:. Project onto y = x: 0 0 [ ] [ ] 0.8 0.6 4.2 8. T (P ) = P + 0.6 0.8 1.4 [ ] 1/2 1/2. 1/2 1/2 9. The product of two rotation matrices has entries of the form cos(θ + γ) and ± sin(θ + γ). The product of two reflection matrices has ±1 on the main diagonals and zeroes elsewhere. 6
1 0 0 4 10. 0 1 0 10 0 0 1 2 0 0 0 1 e f g 11. M arb = g e f where e = 1+, f = 1, g = 1. f g e (0, 0, 0) (0, 0, 0) (0, 0, 1) (0., 0.24, 0.91) (0, 1, 0) ( 0.24, 0.91, 0.) (0, 1, 1) (0.09, 0.67, 1.24) (1, 0, 0) (0.91, 0., 0.24) (1, 0, 1) (1.24, 0.09, 0.67) (1, 1, 0) (0.67, 1.24, 0.09) (1, 1, 1) (1, 1, 1) 0 1 0 1 0 0 0 1 0 12. M arb = 0 0 1 = 0 0 1 1 0 0. The product on the right 1 0 0 0 1 0 0 0 1 represents a clockwise (π/2) rotation around the z-axis followed by a clockwise (π/2) rotation around the x-axis. 1. Both tetrahedrons are centered at (0, 0, 0) so no translation is needed. The larger needs to be scaled down by 1/ 8. Transforming the tetrahedron from the exercise to the one from the example gives the following matrix: 0.29 0.14 0.14 M = 0.20 0.20 0.20 0 0.25 0.25 14. Both sides of the equation are vectors, so we need to show their coordinates match. The x coordinate of A (B C) is a y (b x c y b y c x ) a z (b z c x b x c z ) 7
On the right side, the x coordinate is a x c x + a y c y + a z c z )b x (a x b x + a y b y + a z b z )c x Algebraically they are equal and the same approach shows the y and z coordinates are equal. 15. If R cw is the clockwise rotation that moves the line to the x-axis, then [ ] [ ] [ ] 1 0 1 0 0.28 0.96 T = Rcw 1 R 0 1 cw = 0 1 0.96 0.28 The matrix corresponds to a counter-clockwise rotation of 106.26. 16. Each cross section where y = y 0 becomes a parallelogram with area one. The height (y direction) of the cube does not change since all y coordinates remain the same. Hence the transformed cube has volume one. 17. Projected segment has end points (.08, 1.54) and (2.5, 5). 18. Projected segment has end points (4, 2, 6) and (5, 10, 20). 19. Assuming the eye is on the z axis and the two segments are parallel to each other, if they are also parallel to the xy plane, they will project to parallel lines. [ ] 1 2 20. 0 1 21. a w = a ( w ( a w) a) = a w ( a w)( a a) = a w 22. The transformed cube is similar to that in exercise #16; only the orientation of the parallelogram cross-sections has changed. Volume is still one. 8