Problem

Write a class Quaternion that defines the four basic operations of quaternions and the two...

Write a class Quaternion that defines the four basic operations of quaternions and the two I/O operations. Quaternions, as defined in 1843 by William Hamilton and published in his Lectures on Quaternions in 1853, are an extension of complex numbers. Quaternions are quadruples of real numbers, (a,b,c,d) = a + bi + cj + dk, where 1 = (1,0,0,0), i = (0,1,0,0), j = (0,0,1,0), and k = (0,0,0,1) and the following equations hold:

i2 = j2 = k2 = –1ij = k, jk = i, ki = j, ji = –k, kj = –i, ik = –j  (a + bi + cj + dk) + (p + qi + rj + sk) = (a + p) + (b + q)i + (c + r)j + (d + s)k  (a + bi + cj + dk) · (p + qi + rj + sk) = (ap – bq – cr – ds) + (aq + bp + cs – dr)i  + (ar + cp + dq – bs)j + (as + dp + br – cq)k

Use these equations in implementing a quaternion class.

Step-by-Step Solution

Request Professional Solution

Request Solution!

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.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 1
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT