Quaternions. In 1843, Sir William Hamilton discovered an extension to complex numbers called quaternions. A quaternion is a vector a = (a0, a1 a2, a3) with the following operations:
• Magnitude:
• Conjugate: the conjugate of a is (a0, −a1, −a2, −a3)
• Inverse: a−1 = (a0/|a|2, − a1/|a|2, − a2/|a|2, −a3/|a|2)
• Sum: a + b = (a0 + b0, a1 + b1, a2 + b2, + b3)
• Product: a × b = (a0b0 − a1b1, − a2 b2 − a3b3, a0bl − a1b0 + a2b3 − a3 b2, a0b2 − a1b3 + a2b0 + a3b1, a0b3 + a1b2 − a2/b1 + a3b0)
• Quotient: a/b =ab−1
Create a data type Quaternion for quaternions and a test client that exercises all of your code. Quaternions extend the concept of rotation in three dimensions to four dimensions. They are used in computer graphics, control theory, signal processing, and orbital mechanics.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.