One of the open source projects I have created is an orientation representation library, mori, centered around representations commonly used in the materials community. This library developed from my frustration over the years of dealing with orientation conversions used by different groups and whether or not passive or active rotations are being used. Others have also clearly run into similar irritations over the years which even led to the publishing of a very nice paper trying to create a common convention for how to do things 1.
mori - Material Orientation Library in Rust
An orientation library built around commonly used orientation representations used in crystallography and engineering applications. It contains conversion, rotation, and data analysis operations for various orientation spaces.
Orientations play a large role in a number of fields ranging from: crystallography, x-ray diffraction, metallurgy, solid mechanics, and the list can go on and on. Therefore, it’s important to have a library that easily allows conversions from Eulearian representations to rotation matrices to neo-eulerian representation to quaternions.
The initial scope of this library will provide common sets of conversions. In an attempt to have a consistent set of conversions with others in the field, a majority of these conversions have been taken from 1. The library also includes various vector and tensor passive rotation operations. Operations such as these are commonly associated with orientations. Therefore, a number of orientations support these features. Outside of these features, various helper methods have been added to several orientations representations such as being able to easily obtain the transpose of an orientation. It should be noted that these helper functions are not necessarily the same across different orientation conversions.
The code offers the following abilities:
- A set of conversions between commonly used orientation representations
- Vector and tensor rotation operations for a select few orientations.
- Parallel capabilities when the parallel feature flag is used.
- Convenient operations for select orientation conventions
Later as it develops, the plan is to include the following:
- Crystallographic fundamental region conversions
- Mean orientation calculations
- Misorientation calculations based upon the work of 2 3
:↩ D Rowenhorst et al 2015 Consistent representations of and conversions between 3D rotations Modelling Simul. Mater. Sci. Eng. 23 083501
:↩ Barton N R and Dawson P R 2001 A methodology for determining average lattice orientation and its application to the characterization of grain substructure Metall. Mater. Trans. A 32 1967–75
:↩ Glez J C and Driver J 2001 Orientation distribution analysis in deformed grains J. Appl. Cryst. 34 280–8