subject
Engineering, 14.05.2021 04:00 pawfox

Adding Rotations to Our Quaternion Class We have developed a quaternion class in MATLAB to perform most of the basic arithmetic operations involving quaternions, and we would like to be able to expand this to include operations for handling 3D rotations. To do this, we would to add two methods to the quaternion class that allow us to compute these rotations. 1. obj = rotationquaternion(n, th) Will be a function that takes as its input a 3-vector n = [nx ny nz] that will serve as the axis of rotation and an angle th given in radians. This function will construct the rotation quaternion q according to the formula 9= COS + sin (*) (nzi+nyj + n_k). 2 Requirements: • This function should return obj , which is a member of the quaternion class. (This just means that you use the constructor like we have in other methods where we need to return a quaternion.) • The program needs to make sure that n is a unit vector. The easiest way to do this is to divide by norm(n) . (You don't need the 1 * that shows up in the example above. That's just there for plotting purposes.)

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 14:10
When at a point two solid phase changes to one solid phase on cooling then it is known as a) eutectoid point b) eutectic point c) peritectic point d) peritectoid point
Answers: 3
question
Engineering, 03.07.2019 14:10
The y form of iron is known as: a) ferrite b) cementite c) perlite d) austenite
Answers: 3
question
Engineering, 04.07.2019 18:10
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
question
Engineering, 04.07.2019 18:10
Manometers are good examples of measuring instruments, nowadays they are not as common as before. a)-capacitive probe gauges b)-gravitational gauges deformation ) gauges d)-digital gauges
Answers: 1
You know the right answer?
Adding Rotations to Our Quaternion Class We have developed a quaternion class in MATLAB to perform m...
Questions
question
Mathematics, 20.10.2020 04:01
question
Mathematics, 20.10.2020 04:01
question
History, 20.10.2020 04:01
question
Mathematics, 20.10.2020 04:01
question
Mathematics, 20.10.2020 04:01
Questions on the website: 13722361