Quaternios and Axis-angle are 4D representations of 3D rotations / orientations, and both have pro and cons.
Axis-angle: represents the rotation through its angle a and the axis of rotation n . For example, a 180 degree rotation around the Y axis would be represented as a = 180, n = {0,1,0}. The view is very intuitive, but the actual application requires a different view, such as a quaternion or rotation matrix.
Quaternion: represents a turn on a 4D vector. It takes more math and is less intuitive, but is a much more powerful representation. Quaternions are easily interpolated (mixed) and easy to apply at a 3D point. These formulas can be easily found on the Internet. When radians rotate around the normalized axis n, the 4D quaternion vector will be {cos a / 2, (sin a / 2) n_x, (sin a / 2) n_y, (sin a / 2) n_z}. What comes from the sine and cosine of a polygon.
source share