Solutions: 7a) The rotation is supposed to rotate (1, -1) to (-1, 1). In this case it is obvious that the angle between the two vectors are 180 degrees. It can also be calculated by using the scalar product between the two vectors: (1, −1)•(−1,1) cosθ = = −1 --> θ =π 2 ! " cosθ $ $ sin θ $ 0 # −sin θ cosθ 0 0 0 1 % ' '= ' & " −1 0 0 % $ ' $ 0 −1 0 ' $ 0 0 1 ' # & b) It is obvious that the distance from both points to the origin is equal and therefore we can find a rotation about the origin to transform (1, -1) to (1, 1). By for example plotting the points it is easily seen that the rotation with an angle less than 180 degrees has to be counter-clockwise in this case. We find the rotation matrix by first finding the cosine of the angle between the two vectors. (Notice: If you want to find out whether or not the rotation is counter-clockwise without needing to plot the vectors, you can use the vector product. In this case, we can find the vector product (1, −1) × (1,1) = (1, −1, 0) × (1,1, 0) = (0, 0, 2) , which means that the result points in the positive direction of the z-axis, which means that the rotation from (1, -1) to (1, 1) has to be counterclockwise. This reasoning can be used for other cases as well, so please check this for other exercises.) cosθ = " cosθ $ $ sin θ $ 0 # (1, −1)•(1,1) 2 2 2 2 1 + (−1) ⋅ 1 +1 −sin θ cosθ 0 0 0 1 = 0 --> θ =π / 2 ! sinθ = sin π = 1 2 % " 0 −1 0 % ' $ ' '=$ 1 0 0 ' ' $ 0 0 1 ' & # & c) Using the same reasoning as above it is also clear that the rotation has to be counter-clockwise (with an angle less than 180 degrees). cosθ = (1, −1)•( 2, 0) 2 = 2 2 Since we know that the angle for the counter-clockwise rotation is less than 180 degrees then the sine has to be positive and therefore: sinθ = 1− ( 2 )2 = 2 2 " cosθ $ $ sin θ $ 0 # −sin θ cosθ 0 0 0 1 " % $ ' $ '=$ ' $ & # % 2 /2 − 2 /2 0 ' 2 /2 2 /2 0 ' ' 0 0 1 ' & 2 d) Using the same reasoning as above it is also clear that the rotation has to be counter-clockwise (with an angle that is less than 180 degrees). cosθ = (1, −1)•(0, 2 ) − 2 = 2 2 Since we know that the angle for the counter-clockwise rotation is less than 180 degrees then the sine has to be positive and therefore: sin θ = 1− ( " cosθ $ $ sin θ $ 0 # − 2 2 2 ) = 2 2 −sin θ cosθ 0 0 0 1 " % % $ − 2 /2 − 2 /2 0 ' ' $ 2 /2 − 2 /2 0 ' '=$ ' ' $ 0 0 1 ' & # & e) Using the same reasoning as above it is also clear that the rotation has to be counter-clockwise (with an angle that is less than 180 degrees). cosθ = (1, −1)•( 7 / 2,1 / 2) 7 −1 = 2 4 Since we know that the angle for the counter-clockwise rotation is less than 180 degrees then the sine has to be positive and therefore: sin θ = 1− " cosθ $ $ sin θ $ 0 # 7 +1− 2 7 8+ 2 7 = 16 4 −sin θ cosθ 0 (Notice: 0 0 1 " % % $ ( 7 −1) / 4 − 8 + 2 7 / 4 0 ' ' ' $ ( 7 −1) / 4 0 ' ' = $ 8+ 2 7 / 4 ' $ 0 0 1 ' & $ ' # & 8+ 2 7 (1+ 7)2 1+ 7 ) = = 4 4 4 8a) For rotation about another point than the origin we first need to translate that point to the origin. In this case we need to translate with the vector (-1, -1). Therefore the points (3, 2) and (2, 3) are translated to (2, 1) and (1, 2), respectively. Now we need to find a rotation about the origin to rotate (2, 1) to (1, 2). This is now very similar to the questions in exercise 7. It is easily seen that the rotation from (2, 1) to (1, 2) with an angle less than 180 degrees has to be counter-clockwise. cosθ = (2,1)•(1, 2) 4 = 5 5 Since we know that the angle for the counter-clockwise rotation is less than 180 degrees then the sine has to be positive and therefore: 4 3 sin θ = 1− ( )2 = 5 5 Therefore the rotation about the origin to rotate (2, 1) to (1, 2) is: " cosθ $ $ sin θ $ 0 # −sin θ cosθ 0 0 0 1 % " 4 / 5 −3 / 5 0 % ' $ ' '=$ 3/ 5 4 / 5 0 ' ' $ 0 0 1 '& & # As discussed before, in order to rotate (3, 2) to (2, 3) with a rotation about (1, 1) we need a translation followed by the rotation about the origin. Then we need to translate back the points with the inverse translation. Therefore the answer is: ! 1 0 1 $! 4 / 5 −3 / 5 0 $ ! 1 0 −1 $ # &# & # & # 0 1 1 &# 3 / 5 4 / 5 0 & # 0 1 −1 & # 0 0 1 &# 0 0 1 &% #" 0 0 1 &% " %" b) This is more or less the same question. We need to do exactly the same first translation. Then we need to find a rotation about the origin to rotate (1, 2) to (2, 1). Here we can see that the rotation with an angle less than 180 degrees has to be clockwise. As mentioned before this can also be verified by the vector product: (1, 2, 0) x (2, 1, 0) = (0, 0, -3), which pints in the negative direction of the z-axis, which means that it must be a clockwise rotation from (1, 2) to (2, 1). Therefore the rotation needed about the origin is: " cosθ $ $ −sin θ $ 0 # sin θ cosθ 0 0 0 1 % " 4 / 5 3/ 5 0 % ' $ ' ' = $ −3 / 5 4 / 5 0 ' ' $ 0 0 1 '& & # The final answer is therefore: ! 1 0 1 $! 4 / 5 3 / 5 0 $ ! 1 0 −1 $ # &# & # & # 0 1 1 &# −3 / 5 4 / 5 0 & # 0 1 −1 & # 0 0 1 &# 0 0 1 &% #" 0 0 1 &% " %" 9a) When the fixed point is the origin, scaling means that we multiply the x and y coordinates with their respective factor. In this case, we can see that the point (1, 1) in A has to be scaled to (3, 2) in B. Observe that according to the definition of scaling the scaling factors are positive and therefore the bottom point of A is scaled to the bottom point of B and the top point of A to the point of B. Therefore, the point (1, 2) in A has to be scaled to (3, 4) as well. Therefore (1, 1) ! (3, 2) and (1, 2) ! (3, 4). By looking at the x-coordinates and y-coordinates it is easily seen that the factor is 3 for x and 2 for y. Therefore the scaling matrix is: ! 3 0 0 $ # & # 0 2 0 & # 0 0 1 & " % b) This is just the inverse scaling of the one in (a). Therefore: ! 1/ 3 0 0 $ # & # 0 1/ 2 0 & # 0 0 1 &% " c) With the same reasoning as in (a) we can see that (1, 1) has to be scaled to (5, 1) and (1, 2) to (5, 2). It is easily seen that the scaling factor for x is 5 and for y is 1. Therefore: ! 5 0 0 $ # & # 0 1 0 & # 0 0 1 & " % d) In this case (1, 1) has to be scaled to (4, 1) which gives a scaling factor 4 in the x-direction and 1 in the y-direction. In order to scale the other point, i.e. (1, 2) to the other point in D, i.e. (4, 3), the scaling factor in the x-direction has to be 4 and in the y-direction it has to be 3/2. Therefore, if the fixed point is the origin then there is no scaling factor in the y-direction that can scale both points in A to their corresponding points in D. So, if a scaling is possible then it has to with regards to another fixed point. Since the scaling factor for the x-direction were 4 for both points then we can conclude that the x-coordinate of the fixed point is 0 and the scaling factor is 4 in the x-direction. The problem is now to find the fixed point and the scaling factor in the y-direction. As discussed in the lecture notes a scaling about an arbitrary fixed point is performed by a translation, followed by scaling and the inverse translation. As discussed in the lecture, the equation for the scaling about an arbitrary fixed point (xf, yf) is: " x = x + s (x − x ) $ 2 f x 1 f # y = y + s (y − y $% 2 f y 1 f) Here we just need to concentrate on the y-values (as discussed) and the second equation in the above equation system. Now, our goal is to check if it is possible to find yf and sy to scale 1 to 1 and 2 to 3. We get the following equations: " 1 = y + s (1− y ) $ f y f # $% 3 = y f + sy (2 − y f ) By for example, taking the difference between these two equations, we get: 2 = sy which gives yf = 1. This means that it is possible to scale A to D about the fixed-point (0, 1) and with the scaling factors sx=4 and sy=2. Therefore, the scaling is a combination of a translation with (0, -1) and a scaling with regards to the origin and the inverse translation: ! 1 0 0 $ # & # 0 1 1 & # 0 0 1 & " % ! 4 0 0 $! 1 0 0 $ # &# & # 0 2 0 &# 0 1 −1 & # 0 0 1 &# 0 0 1 & " %" % 10" cosθ $ $ sin θ $ 0 # −sin θ cosθ 0 0 0 1 % ' ' ' & ! S 0 0 $! cosθ # &# # 0 S 0 &# sin θ # 0 0 1 &# 0 " %" " S 0 0 % " S cosθ $ ' $ $ 0 S 0 ' = $ S sin θ $ 0 0 1 ' $ 0 # & # −S sin θ S cosθ 0 0 0 1 % ' ' ' & $ ! S cosθ & # & = # S sin θ & # 0 % " −S sin θ S cosθ 0 0 0 1 $ & & & % −sin θ cosθ 0 0 0 1 11The distance between P and the origin is 5 . The distance between P’ and the origin is 20 = 2 5 . Therefore the scaling factor has to be 2. Because if we want to rotate a point about the origin to another point then these points have to have the same distance to the origin. So, after scaling of P: (1, 2) we get a new point: Q : 2 ∗ (1, 2) = (2, 4) Now we find the rotation from Q to P ' = ( 11, 3) . We have seen many similar examples. The rotation is clockwise, why? cosθ = (2, 4)•( 11, 3) 6 + 11 = 20 10 sin θ = 1− 36 +11+12 11 53 −12 11 = 100 10 The answer is therefore a uniform scaling with S=2 followed by a clockwise rotation about the origin. " 6 + 11 $ $ 10 $ $ 53 −12 11 $ − 10 $ $ 0 $ $ # 53 −12 11 10 6 + 11 10 0 % ' 0 ' '" 2 0 0 % '$ ' 0 '$ 0 2 0 ' '$ 0 0 1 ' & 1 '# ' ' & 12a) We know from before (see the lecture note for Transformations pages 20 and 21) that for uniform scaling, the scaling matrix is the same regardless of the direction of the scaling. This is easily seen if you put s1=s2 in the matrix on page 21 in the mentioned lecture notes. The answer is therefore: ! 3 0 0 $ # & # 0 3 0 & # 0 0 1 & " % b) The scaling here is not uniform and therefore we need to perform the rotation. From the figure we can see that if we perform a clockwise rotation then we get S1 and S2 on the x and y-axis, respectively. The cosine of the angle of rotation can be found by the scalar product between S1:(2, 1) and the x-axis. cosθ = (2,1)•(1, 0) 2 2 +12 =2/ 5 which gives: sinθ = 1 / 5 The scaling in the mentioned direction can now be found by a clockwise rotation followed by a scaling with scaling factors Sx=3, Sy=2 along the x- and y-axis and the inverse rotation. The answer is therefore: " % $ 2 / 5 −1 / 5 0 ' $ 1/ 5 2 / 5 0 ' $ ' 0 0 1 ' $ # & " 3 0 0 % $ ' $ 0 2 0 ' $ 0 0 1 ' # & " % $ 2 / 5 1/ 5 0 ' $ −1 / 5 2 / 5 0 ' $ ' 0 0 1 ' $ # & 13a) We already know the reflection matrix across the x- and y-axis (see the lecture notes for Transformations page 22). In order to find the reflection matrix across an arbitrary line we need to transform the line to one of these two axes, and then perform the reflection and transform everything back. In this exercise, since the line y=2x is going through the origin we can rotate it clockwise about the origin to make it coincide with the x-axis. (You can of course perform a counter clockwise rotation and make it coincide with the y-axis.) The only thing we need is to find the cosine and the sine of the angle between the line and the x-axis. Since the line is going through the origin we can find the angle by the scalar product between the x-axis and a vector on the line, for example (1, 2). cosθ = (1, 2)•(1, 0) 2 1 +2 2 = 1 5 The sine of this angle is also positive (why?) and therefore: sinθ = 2 / 5 The reflection across y=2x can now be defined by a clockwise rotation (see above) followed by a reflection across the x-axis and the inverse rotation. The answer is therefore: " % $ 1 / 5 −2 / 5 0 ' $ 2 / 5 1/ 5 0 ' $ ' 0 0 1 ' $ # & " 1 0 0 % $ ' $ 0 −1 0 ' $ 0 0 1 ' # & " % $ 1/ 5 2 / 5 0 ' $ −2 / 5 1 / 5 0 ' $ ' 0 0 1 ' $ # & b) The line y=2x+1 is not going through the origin. If we now translate it to make it go through the origin then it will be the same problem as in part (a). In addition to part (a) here we just need a translation in the beginning and its invers at the end. For translation we just need to translate any point on y=2x+1 to the origin. For example the point (0, 1) is on this line. Therefore, the answer is: ! $ ! 1 0 0 $# 1 / 5 −2 / 5 0 & # &# & # 0 1 1 &# 2 / 5 1 / 5 0 & # 0 0 1 &# 0 0 1 & " % " % ! 1 0 0 $ # & # 0 −1 0 & # 0 0 1 & " % ! $ # 1/ 5 2 / 5 0 & # −2 / 5 1 / 5 0 & # & 0 0 1 & # " % ! 1 0 0 $ # & # 0 1 −1 & # 0 0 1 & " % 14→ P1P2 = (1, 4, 0) − (1,1, 0) = (0, 3, 0) = (0,1, 0) , which means that this axis is parallel to the y-axis a) with the same direction. Therefore, in order to get the line coincide with the y-axis we just need a translation. Notice that for the translation we can pick any point on the line. In this case you can easily see that (1, 0, 0) is on the line going through P1P2. The actual 90 degrees counter-clockwise rotation about the y-axis is: " cos(π / 2) $ 0 $ $ −sin(π / 2) $$ 0 # 0 sin(π / 2) 1 0 0 cos(π / 2) 0 0 0 0 0 1 % " ' $ 0 ' $ 0 ' = $ −1 '' $ & # 0 0 1 0 0 1 0 0 0 0 0 0 1 % ' ' ' ' & The final answer is therefore the translation of (1, 0, 0) to the origin followed by the rotation about the y-axis and the final inverse translation: ! # # # # " 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 $! &# &# &# &# %" 0 0 −1 0 0 1 0 0 1 0 0 0 0 0 0 1 $ & & & & % ! # # # # " 1 0 0 0 0 1 0 0 0 −1 $ & 0 0 & 1 0 & & 0 1 % Notice that for the translation you can of course translate P1:(1, 1, 0) to the origin as well and therefore the following matrix works as well: ! # # # # " 1 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 $! &# &# &# &# %" 0 0 −1 0 0 1 0 0 1 0 0 0 0 0 0 1 $ & & & & % ! # # # # " 1 0 0 0 0 1 0 0 0 −1 $ & 0 −1 & 1 0 & & 0 1 % = (3, 0, 0) , which means that the rotation axis is parallel to the x-axis. We just need to b) P→ 1P2 translate first. As discussed in the previous exercise, translating any point on P1P2 to the origin works. In this case you can easily see that (0, 1, 0) is on the line. The actual 90 degrees counterclockwise rotation about the x-axis is: " $ $ $ $$ # 1 0 0 0 cos(π / 2) −sin(π / 2) 0 sin(π / 2) cos(π / 2) 0 0 0 0 0 0 1 % " ' $ 1 ' $ 0 '=$ 0 '' $ & # 0 0 0 0 % ' 0 −1 0 ' 1 0 0 ' ' 0 0 1 & The final answer is therefore the translation of (0, 1, 0) to the origin followed by the rotation about the x-axis and the final inverse translation: ! # # # # " 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 $! &# &# &# &# %" 1 0 0 0 0 0 0 $ ! & # 0 −1 0 & # 1 0 0 & # & # 0 0 1 % " 1 0 0 0 0 1 0 0 0 0 $ & 0 −1 & 1 0 & & 0 1 % Notice that for the translation you can of course translate P1:(1, 1, 0) to the origin as well and therefore the following answer works as well: ! # # # # " 1 0 0 0 0 1 0 0 0 0 1 0 1 1 0 1 $! &# &# &# &# %" 1 0 0 0 0 0 0 $ ! & # 0 −1 0 & # 1 0 0 & # & # 0 0 1 % " 1 0 0 0 0 1 0 0 0 −1 $ & 0 −1 & 1 0 & & 0 1 % 15- The line is going through (0, 0, 0) and therefore no translation is needed. The line is on the XY-plane, so we just need one rotation around the z-axis to get it coincide with the x-axis (or the y-axis if you want). A vector on the line (and of course the XY-plane) is for example (1, 1, 0) so it is easy to realize that the angle between the line and the x-axis is 45 degrees. Therefore the rotation about this line can be defined as a clockwise rotation about the z-axis (to get the line coincide with the x-axis), followed by the actual rotation about the x-axis and the final inverse rotation: " $ $ $ $ $ # % 2 / 2 − 2 / 2 0 0 '" $ 2 /2 2 / 2 0 0 '$ ' 0 0 1 0 '$$ 0 0 0 1 '&# 1 0 0 cosθ 0 sin θ 0 0 0 −sin θ cosθ 0 0 0 0 1 % ' ' ' ' & " 2 /2 $ $ − 2 /2 $ 0 $ $ 0 # % 2 /2 0 0 ' 2 /2 0 0 ' ' 0 1 0 ' 0 0 1 '& = (1, −1, 0) , which is on the XY-plane. 16- First we need to translate P1 to the origin. Then P→ 1P2 Since the line is on the XY-plane only one rotation is needed to align it with the x- or the yaxis. By plotting this vector on the XY-plane we can see that we need a counterclockwise rotation by 45 degrees around the z-axis to get the line coincide with the x-axis (why 45 degrees?). So, the rotation is defined by a translation to move P1:(0, 1, 0) to the origin, followed by the counterclockwise rotation by 45 degrees about the z-axis to make the rotation axis coincide with the x-axis and the actual rotation about the x-axis and the inverse rotation and inverse translation: ! # # # # " 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 $! 2 / 2 &# &# − 2 / 2 &# 0 &## %" 0 $ 2 / 2 0 0 &! # 2 / 2 0 0 &# & 0 1 0 &## 0 0 1 &%" 1 0 0 0 cosθ −sin θ 0 sin θ cosθ 0 0 0 0 0 0 1 $ & & & & % ! # # # # # " $ 2 /2 − 2 /2 0 0 & ! # 2 /2 2 /2 0 0 & # & 0 0 1 0 & ## 0 0 0 1 &% " 1 0 0 0 0 1 0 0 0 0 $ & 0 −1 & 1 0 & & 0 1 % 17- The line is going through the origin and therefore no translation is needed. But the line is not on any of the XY-, YZ- or XZ-planes and therefore we need two rotations about two of the coordinate axes to get this line aligned with one of the three coordinate axes. There are many different ways but here we do it the way that was described during the lectures. This means that we firstly rotate this line clockwise by angle ϕ about the z-axis to rotate it on the XZ-plane, see the figure. Notice that P1 is the coordinate origin, point O, in this exercise. z x P2 O ϕ y Q2 x As seen in the figure ϕ is the angle between OQ2 and the x-axis. But Q2 is the orthogonal projection of P2 on the XY-plane and therefore Q2:(2, 1, 0). The cosine of ϕ is now easily found by the scalar product between OQ2 and the x-axis: cos ϕ = (2,1, 0)•(1, 0, 0) 2 = 5 5 sin ϕ = 1− , for this point it is easy to realize that sin ϕ > 0 and therefore: 4 1 = 5 5 Therefore the first rotation to get the line on the XZ-plane is: " % $ 2 / 5 1/ 5 0 0 ' $ −1 / 5 2 / 5 0 0 ' $ ' 0 0 1 0 ' $ $ 0 0 0 1 '& # Now the point P2 is rotated to the point M2 on the XZ-plane, see the figure. z x P2 M 2 O x y Since M2 is now on the XZ-plane we only need one more rotation (clockwise around the yaxis) to get the line coincide with the z-axis. But the angle between OM2 and the z-axis is equal to the angle between OP2 and the z-axis, (why?). Therefore: cosθ = (2,1,1)•(0, 0,1) 1 = 6 6 As discussed in the lectures the angle θ is between 0 and 180 degrees and therefore its sine is positive: 5 6 sin θ = Therefore the second rotation to get the line on the Z-axis is: " $ 1/ 6 $ 0 $ $ 5/ 6 $ 0 # 0 − 5/ 6 1 0 0 0 1/ 6 0 % 0 ' 0 ' ' 0 ' 1 '& Therefore, the final answer is these two rotations to get the line coincide with the z-axis followed by the actual rotation about the z-axis and the inverse rotations: " $ 2 / 5 −1/ 5 0 0 $ 1/ 5 2 / 5 0 0 $ 0 1 0 $ 0 $ 0 0 0 1 # %" '$ 1/ 6 0 '$ 0 1 '$ '$ − 5 / 6 0 '$ 0 0 &# % 5 / 6 0 '" $ 0 0 '$ ' 1/ 6 0 '$ $ 0 1 '&# cosθ −sinθ sinθ cosθ 0 0 0 0 0 0 1 0 0 0 0 1 % ' ' ' ' & " $ 1/ 6 0 − 5 / 6 $ 0 1 0 $ $ 5 / 6 0 1/ 6 $ 0 0 0 # %" 0 ' $ 2 / 5 1/ 5 0 0 0 ' $ −1/ 5 2 / 5 0 0 '$ 0 '$ 0 0 1 0 ' $ 1 &# 0 0 0 1 % ' ' ' ' ' & 20We now need to find the transformation matrix that transforms the view system to the world system. In this case the systems’ axes are all parallel to each other. So if we do the obvious translation with the vector (-1, -2, -3) we move the origin of the view system to the origin of the world system. Notice that since both systems are right handed, then the z-axis of the world system points outwards but the n-axis of the view system points inwards. Therefore, after the translation we can notice that: û = x̂ → û = (1, 0, 0) , v̂ = − ŷ → v̂ = (0, −1, 0) and n̂ = −ẑ → n̂ = (0, 0, −1) . Now as discussed in the lectures (please see the lecture notes for Transformations pages 45 and 46) the transformation to go from the world coordinate system to the view coordinate system is the following: ! # # # # " u v n 1 $ ! & # &=# & # & # % " 1 0 0 0 0 −1 0 0 0 0 −1 0 0 0 0 1 $ & & & & % ! # # # # " 1 0 0 0 0 1 0 0 0 0 1 0 −1 −2 −3 1 $! &# &# &# &# %" x $ & y & z & & 1 % By replacing (x, y, z) in the above equation with the coordinates in part (a), (b) and (c) you get their corresponding coordinates in the view system. The answers are therefore: a) (0, 0, 0) , b) (−1, 2, 3) and c) (3, −3, −3) 21This is just the inverse of the above (just notice that (AB)−1 = B−1 A−1 ): ! # # # # " x $ ! 1 0 & # y & # 0 1 = z & # 0 0 & # 1 % " 0 0 0 0 1 0 $! &# &# &# &# %" 1 2 3 1 1 0 0 0 0 −1 0 0 0 0 −1 0 0 0 0 1 $! &# &# &# &# %" u v n 1 $ & & & & % The answers are now easily found by putting them in the above equation: a) (1, 2, 3) , b) (0, 0, 0) and c) (3, −1, −1) 22As seen in the figure, we need a translation with (-1, -2, -3) and a clockwise rotation about the z-axis with 30 degrees to get the axes of the view system aligned with those of the world system. After doing these two transformations we will have û = (1, 0, 0) , v̂ = (0, −1, 0) and n̂ = (0, 0, −1) . See the solution for exercise 20. The transformation is therefore: ! # # # # " u v n 1 $ ! & # &=# & # & # % " 1 0 0 0 0 −1 0 0 0 0 −1 0 0 0 0 1 $ & & & & % ! cos(π / 6) sin(π / 6) # # −sin(π / 6) cos(π / 6) # 0 0 ## 0 0 " 0 0 1 0 0 0 0 1 $! &# &# &# &&# %" 1 0 0 0 0 1 0 0 0 0 1 0 −1 −2 −3 1 $! &# &# &# &# %" x $ & y & z & & 1 % By replacing (x, y, z) in the above equation with the coordinates in part (a), (b) and (c) you get their corresponding coordinates in the view system. The answers are therefore: a) (0, 0, 0) , b) (−1.8660,1.2321, 3) and c) (4.0981, −1.0981, −3) 23This is just the inverse of the above (just notice that (ABC)−1 = C −1B−1 A−1 ): ! # # # # " x $ ! 1 & # y & # 0 = z & # 0 & # 1 % " 0 0 1 0 0 0 0 1 0 1 2 3 1 $! cos(π / 6) −sin(π / 6) &# &# sin(π / 6) cos(π / 6) &# 0 0 &## %" 0 0 0 0 1 0 0 0 0 1 $! &# &# &# &&# %" 1 0 0 0 0 −1 0 0 0 0 −1 0 0 0 0 1 $ & & & & % ! # # # # " u v n 1 $ & & & & % The answers are now easily found by putting them in the above equation: a) (1, 2, 3) , b) (1.1340, −0.2321, 0) and c) (4.2321, 0.4019, −1) 24Please see the lecture notes for Transformations on pages 52 and 53. N = (−3, 0, −4) ! n̂ = (−3 / 5, 0, −4 / 5) V '× N û = = (−0.7428, 0.3714, 0.5571) V '× N v̂ = n̂ × û = (0.2971, 0.9285, −0.2228) ! # # # # " u v n 1 $ ! −0.7428 0.3714 0.5571 0 $ ! 1 &# & # & = # 0.2971 0.9285 −0.2228 0 & # 0 & # −0.6 0 −0.8 0 & # 0 &# & # 0 0 1 %" 0 % " 0 0 1 0 0 0 0 1 0 −1 −2 −3 1 $! &# &# &# &# %" x $ & y & z & & 1 % By replacing (x, y, z) in the above equation with the coordinates in part (a), (b) and (c) you get their corresponding coordinates in the view system. The answers are therefore: a) (0, 0, 0) , b) (−1.6713, -1.4856, 3) and c) (0.5571, 3.0084, −4.2) 25This is just the inverse of the above (Notice that the inverse of a matrix whose rows (or columns) make an orthonormal base is equal to its transpose). Therefore: ! # # # # " x $ ! 1 & # y & # 0 = z & # 0 & # 1 % " 0 0 1 0 0 0 0 1 0 1 2 3 1 $! −0.7428 0.2971 −0.6 0 &# &# 0.3714 0.9285 0 0 &# 0.5571 −0.2228 −0.8 0 &# 0 0 1 %" 0 $ & & & & % ! # # # # " u v n 1 $ & & & & % The answers are now easily found by putting them in the above equation: a) (1, 2, 3) , b) (0.5370, 3.4856, -0.4027) and c) (-1.9943, 5.5283, 0.2458)
© Copyright 2025 Paperzz