class representing orientations
|On this page ...|
|Calculating with three dimensional vectors|
|Complete Function list|
The class quaternion allows working with rotations in MTEX, as they occur e.g. as crystal orientation or symmetries. Quaternions may be multiplied with three-dimensional vecotors which means rotating the vector or may be multiplied with another quaternion which means to concatenate both rotations.
The standard way is to define a quaternion q is to give its coordinates (a,b,c,d). However, making use of one of the following conversion methods is much more human readable.
q = quaternion(a,b,c,d) % by coordinates q = axis2quat(axis,angle); % by rotational axis and rotational angle q = euler2quat(alpha,beta,gamma) % by Euler angles q = Miller2quat([h k l],[u v w],symmetry); % by Miller indece q = quaternion.id; % identical quaternion q = vec42quat(u1,v1,u2,v2); % by four vectors
Besides the standard linear algebra operations there are also the following functions available in MTEX.
There are methods to transform quaternion in almost any other parameterization of rotations as they are:
The plot function allows you to visualize an quaternion by plotting how the standard basis x,y,z transforms under the rotation.
|q = quaternion(varargin)|
|DocHelp 0.1 beta|