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, 04.07.2019 18:10
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
question
Engineering, 04.07.2019 18:10
Ajournal bearing has a journal diameter of 3.250 in with a unilateral tolerance of 20.003 in. the bushing bore has a diameter of 3.256 in and a unilateral tolerance of 0.004 in. the bushing is 2.8 in long and supports a 700-lbf load. the journal speed is 900 rev/min. find the minimum oil film thickness and the maximum film pressure for both sae 20 and sae 20w-30 lubricants, for the tightest assembly if the operating film temperature is 160°f. a computer code is appropriate for solving this problem.
Answers: 3
question
Engineering, 04.07.2019 18:20
Derive the correction factor formula for conical nozzle i=-(1+ cosa) and calculate the nozzle angle correction factor for a nozzle whose divergence hal-fangle is 13 (hint: assume that all the mass flow originates at the apex of the cone.
Answers: 3
question
Engineering, 04.07.2019 18:20
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point.the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
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
Questions on the website: 13722363