three dimensional vectors, a container over (…, 3) coordinates carrying antipodal, isNormalized, the reference frame and the display style; a vector in a crystal frame is a crystal direction with Miller indices
Syntax
v = vector3d(x, y, z)
From the Cartesian coordinates.
v = vector3d(xyz)
Coordinates of shape (…, 3) or (3, N).
v = vector3d(x, y, z, antipodal=True)
Axes, v and -v the same.
m = vector3d(xyz, frame=cs)
A crystal direction from its Euclidean coordinates.
v = vector3d.byPolar(theta, rho)
From the polar angles.
v = vector3d.X
The axes of the frame, also Y and Z.
m = Miller(1, 1, 1, cs)
A lattice plane normal by its indices hkl.
m = Miller(1, 0, -1, 0, csHex)
Four indices hkil of a hexagonal lattice.
m = Miller(1, 1, 0, cs, 'uvw')
A lattice direction, ‘UVTW’ with four indices.
m = Miller('{111}', cs)
(hkl) one plane, {hkl} the family, [uvw] and
m = Miller(v, cs)
A vector restated in the crystal frame.
Description
A crystal direction is a vector3d whose frame is a crystal frame: it has the Miller indices m.hkl and m.uvw, the four index forms m.hkil and m.UVTW of a trigonal or hexagonal lattice, a d-spacing, and where the frame carries a point group it stands for its symmetrically equivalent set, which dot, angle, mean and unique take into account. It is stored in Euclidean coordinates; MATLAB’s class Miller is a vector3d here, built by the function Miller from its indices.
Input
x, y, z |
arrays of the Cartesian coordinates, broadcast against each other |
xyz |
array of shape (…, 3) or (3, N), a vector3d, or a rank one tensor |
cs |
crystalFrame, also given positionally to vector3d |
Keywords
| keyword | default | description |
|---|---|---|
antipodal |
False |
the vectors are axes: v and -v are the same |
isNormalized |
False |
the coordinates are known to be of length one |
frame |
None |
the referenceFrame the coordinates are given in, a crystal frame making the vectors crystal directions; also given as a positional argument |
dispStyle |
None |
the indices the display shows, ‘hkl’, ‘hkil’, ‘uvw’, ‘UVTW’ or ‘xyz’ |
dtype |
None |
the floating point type of the coordinates |
Output
v |
vector3d |
m |
vector3d, a crystal direction |
Properties
xyz |
Cartesian coordinates as a numeric array of shape v.shape + (3,) |
frame |
referenceFrame of the coordinates, or None for frame-free data |
CS |
crystalFrame for Miller directions, otherwise None |
antipodal |
whether opposite directions represent the same axis |
isNormalized |
whether the coordinates are known to have unit length |
dispStyle |
display convention: ‘xyz’, ‘hkl’, ‘hkil’, ‘uvw’ or ‘UVTW’ |
hkl |
three reciprocal-lattice indices for plane normals in a crystal frame |
uvw |
three direct-lattice indices for lattice directions in a crystal frame |
shape |
array shape excluding the trailing Cartesian coordinate axis |
Example
Store three vectors in one array, normalize them, and select the second vector with Python indexing. Geometric angles are returned in radians.
import numpy as np
from mtex import vector3d, degree
v = vector3d([[3, 0, 0], [0, 4, 0], [0, 0, 5]])
u = v.normalize()
print('Lengths:', v.norm())
print('Second unit vector:', u[1].data)
print('First two vectors, degrees:', float(u[0].angle(u[1]) / degree))
print('Cross product:', np.round(u[0].cross(u[1]).data, 3))
Lengths: [3. 4. 5.]
Second unit vector: [0. 1. 0.]
First two vectors, degrees: 90.0
Cross product: [0. 0. 1.]
See also
Miller, vector3d.byPolar, crystalFrame, VectorDefinition, CrystalDirections
Used on
CrystalOperations, QuasiCrystals, MTEXvsBungeConvention, OrientationFibre, EBSD3Analysis, EBSD3Plotting, Grains3D, Grains3DBoundaries, Grains3DOperations, NeperInterface, EBSDGrid, EBSDInter
MATLAB’s Miller.Miller
source
Citing this page.
This page is part of the documentation of
MTEX, a free and open
source MATLAB toolbox for analyzing and modeling crystallographic textures.
It was written by The MTEX Developers and is published at
https://mtex-toolbox.github.io/Miller.Miller_py.html.
If you use MTEX, or reuse text or figures from this page, in your research,
please cite
F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63
BibTeX
@article{bachmann2010mtex,
author = {F. Bachmann and R. Hielscher and H. Schaeben},
title = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
journal = {Solid State Phenomena},
volume = {160},
pages = {63-68},
year = {2010},
doi = {10.4028/www.scientific.net/SSP.160.63},
url = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}
Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.