Question: This is one question, please use python to solve. In the previous exercises we considered transformations in two spatial dimensions. To accommodate translations we embedded

 This is one question, please use python to solve. In the

previous exercises we considered transformations in two spatial dimensions. To accommodate translations

This is one question, please use python to solve.

In the previous exercises we considered transformations in two spatial dimensions. To accommodate translations we embedded two-dimensional transformations in three-dimensional matrices. Without translations we could have used 22 matrices. In general, if we write linear transformations on Rn that include rotations, reflections, scaling and shearing we need nn matrices. If we also include translation, we need (n+1)(n+1) matrices with the last row containing 0 's except of 1 on the diagonal. In this exercise we consider transformations on R3, i.e. three-dimensional space without translation. In this case it is enough to work with 33 matrices. QUESTION 4a: (8 pts) Use python code to construct the following three 33 transformation matrices: - Ry: Rotate points about the y-axis by an angle of degreey =45 - Rz : Rotate points about the z-axis by an angle of degreez =120 - SH : Shear points in the x-direction by an amount that is sh=2.0 times the y-component, i.e., xnew=xold+2.0yold - SK : Scale the x-component of points by a factor of sk=1/2 Note that by default the direction of rotation about the x,y, or z axis follows the "right hand rule". Point your right thumb in the positive direction along the axis of rotation, and the fingers on your right hand will curl in the direction of rotation. \#\# Finish the code in this cell. degreey =45 Ry=0 degreez =120 Rz=0 sh=1.0 SH=0 sk=1/2 SK =0 QUESTION 4b: (4 pts) Combine the four matrices into one transfrom matrix in the way that : - shear is applied first, - then the scaling. - then rotation along z and - then rotation along y, Store the result in variable M. \#\#\# Put your answer here M=0 from answercheck import checkanswer checkanswer.matrix(M, '5b5f7f618c21c65a5970f5a1b49fbf0e' ); QUESTION 4c: (8 pts) Calculate the inverse of M and store it in M_inv by using Gauss-Jordan elimination with 5ympy. Note that your M_inv should be a sympy. Matrix . \#\#\# Put your answer here \[ \begin{array}{l} \text { M_inv }=0 \\ \text { print (M_inv) } \end{array} \] from answercheck import checkanswer checkanswer.matrix(M_inv, '565b0161887b65a11b5145fea597cadc' ); QUESTION 4d: (4 pts) Consider a point whose coordinates after the transformation M are (1,1,1). Where was this point before the transformation matrix was applied? Print the result below \#\#\# Put your answer here p=0print(p)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!