Skip to Main Content
Visualizing Quaternions
book

Visualizing Quaternions

by Andrew J. Hanson
February 2006
Intermediate to advanced content levelIntermediate to advanced
600 pages
8h 57m
English
Elsevier Science
Content preview from Visualizing Quaternions

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced Mathematics

Advanced Mathematics

Stanley J. Farlow
Geometry for Programmers

Geometry for Programmers

Oleksandr Kaleniuk
Geometric Algebra for Computer Science

Geometric Algebra for Computer Science

Leo Dorst, Daniel Fontijne, Stephen Mann

Publisher Resources

ISBN: 9780120884001