Engineering
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.)

answer
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, skpdancer1605
Ariver flows from north to south at 8 km/h. a boat is to cross this river from west to east at a speed of 20 km/h (speed of the boat with respect to the earth/ground). at what angle (in degrees) must the boat be pointed upstream such that it will proceed directly across the river (hint: find the speed of the boat with respect to water/river)? a 288 b. 21.8 c. 326 d. 30.2
Answers: 3
image
Engineering, 04.07.2019 18:10, keigleyhannah30
Aplate clutch has a single pair of mating friction surfaces 250-mm od by 175-mm id. the mean value of the coefficient of friction is 0.30, and the actuating force is 4 kn. a) find the maximum pressure and the torque capacity using the uniform-wear model. b) find the maximum pressure and the torque capacity using the uniform-pressure model.
Answers: 3
image
Engineering, 04.07.2019 18:10, ayoismeisjjjjuan
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
image
Engineering, 04.07.2019 18:20, yasyyas646646
Agas mixture consists of 8 kmol of h2 and 2 kmol of n2. determine the mass of each gas and the apparent gas constant of the mixture.
Answers: 3
Do you know the correct answer?
Adding Rotations to Our Quaternion Class We have developed a quaternion class in MATLAB to perform m...

Questions in other subjects:

Konu
Biology, 21.08.2019 22:00