2. In this problem we will work with a rotation matrix. Rotation matrices are commonly used for computations in fields such as geometry, physics, and computer graphics. In 3D space, we can rotate an object at position x = (x, y, z) using a rotation matrix. The position x is a column vector representing the x, y, and z coordinates. To rotate the vector counterclockwise by angle about the z-axis, you can multiply x by For b = [10 0 cos 0 sin 0 R(0)x, b is the rotated vector x. R(0) = - 0 sin 8 cost

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Matlab program

2. In this problem we will work with a rotation matrix. Rotation matrices are commonly
used for computations in fields such as geometry, physics, and computer graphics. In
3D space, we can rotate an object at position x = (x, y, z) using a rotation matrix.
The position x is a column vector representing the x, y, and z coordinates. To rotate
the vector counterclockwise by angle about the z-axis, you can multiply x by
0
[1 0
R(0) = 0 cos
0 sin 0
For b= R(0)x, b is the rotated vector x.
1
0
- sin
cost
(a) Write an in-line function that takes in an angle
Using this, calculate R(7/4) and save this as A4.
and returns the matrix R(0).
(b) Rotate the vector x = (-2.3, e, π) about the r-axis using the angle /3. Save the
resulting 3 x 1 vector as A5.
(c) Suppose we have already obtained the 3x1 vector b = (1.2, 3.1,-) from rotating
z around the z-axis by an angle of 7/5. Find z from solving the equation b =
R(0) using standard methods (backslash in MATLAB or solve in Python). Save
the resulting vector as A6.
(d) Find the inverse of the matrix R(7/2) using built-in methods (inv in MATLAB
or scipy. linalg.inv in Python). Save you answer as A7.
=
(e) This is an application where inverse matrices are used quite often, but it is still
a bad idea to actually use the inverse command. But can we figure out an
easier way to do it? The inverse of a rotation is just another rotation. That
is, R(0)- R(), where is a different angle. Find the angle such that
R(3/4)¹ = R(o). Save this answer in a variable named A8. (This does not
require any code, just some geometric reasoning. If you rotate a vector by an
angle 0, what would you have to do to rotate the vector back to where it started?
The answer is not unique, because adding any multiple of 27 to an angle gives
the same rotation matrix. Your answer should be between - and 7.)
Transcribed Image Text:2. In this problem we will work with a rotation matrix. Rotation matrices are commonly used for computations in fields such as geometry, physics, and computer graphics. In 3D space, we can rotate an object at position x = (x, y, z) using a rotation matrix. The position x is a column vector representing the x, y, and z coordinates. To rotate the vector counterclockwise by angle about the z-axis, you can multiply x by 0 [1 0 R(0) = 0 cos 0 sin 0 For b= R(0)x, b is the rotated vector x. 1 0 - sin cost (a) Write an in-line function that takes in an angle Using this, calculate R(7/4) and save this as A4. and returns the matrix R(0). (b) Rotate the vector x = (-2.3, e, π) about the r-axis using the angle /3. Save the resulting 3 x 1 vector as A5. (c) Suppose we have already obtained the 3x1 vector b = (1.2, 3.1,-) from rotating z around the z-axis by an angle of 7/5. Find z from solving the equation b = R(0) using standard methods (backslash in MATLAB or solve in Python). Save the resulting vector as A6. (d) Find the inverse of the matrix R(7/2) using built-in methods (inv in MATLAB or scipy. linalg.inv in Python). Save you answer as A7. = (e) This is an application where inverse matrices are used quite often, but it is still a bad idea to actually use the inverse command. But can we figure out an easier way to do it? The inverse of a rotation is just another rotation. That is, R(0)- R(), where is a different angle. Find the angle such that R(3/4)¹ = R(o). Save this answer in a variable named A8. (This does not require any code, just some geometric reasoning. If you rotate a vector by an angle 0, what would you have to do to rotate the vector back to where it started? The answer is not unique, because adding any multiple of 27 to an angle gives the same rotation matrix. Your answer should be between - and 7.)
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY