Appendix E. Quaternion Survival Kit

This appendix summarizes the essential quaternion utilities (Tables E.1 through E.7) needed to implement many of the concepts presented in the book. Selected programs are duplicated in the text as applicable.

Table E.1. Elementary C code implementing the quaternion operations of Equations 4.1 through 4.3, and forcing unit magnitude as required by Equation 4.4. In this straight C-coding method, we return multiple values as results only through pointers such as double *Q0.

double MIN_NORM = 1.0e-7; void QuaternionProduct (double p0, double p1, double p2, double p3, double q0, double q1, double q2, double q3, double *Q0, double *Q1, double *Q2, double *Q3) { *Q0 = p0*q0 - p1*q1 - p2*q2 - p3*q3; *Q1 = p1*q0 + p0*q1 ...

Get The Morgan Kaufmann Series in Interactive 3D Technology: Visualizing Quaternions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.