- class orix.vector.Vector3d(data=None)#
Vector base class.
- Vectors support the following mathematical operations:
Addition to other vectors, scalars, numbers, and compatible array-like objects.
Subtraction to and from the above.
Multiplication to scalars, numbers, and compatible array-like objects.
Division by the same as multiplication. Division by a vector is not defined in general.
>>> from orix.vector import Vector3d >>> v = Vector3d((1, 2, 3)) >>> w = Vector3d(np.array([[1, 0, 0], [0, 1, 1]])) >>> w.x array([1, 0]) >>> v.unit Vector3d (1,) [[0.2673 0.5345 0.8018]] >>> -v Vector3d (1,) [[-1 -2 -3]] >>> v + w Vector3d (2,) [[2 2 3] [1 3 4]] >>> w - (2, -3) Vector3d (2,) [[-1 -2 -2] [ 3 4 4]] >>> 3 * v Vector3d (1,) [[3 6 9]] >>> v / 2 Vector3d (1,) [[0.5 1. 1.5]] >>> v / (2, -2) Vector3d (2,) [[ 0.5 1. 1.5] [-0.5 -1. -1.5]]
Azimuth spherical coordinate, i.e. the angle \(\phi \in [0, 2\pi]\) from the positive z-axis to a point on the sphere, according to the ISO 31-11 standard [Weisstein, 2005].
Return the number of dimensions for this object.
Return the perpendicular vectors.
Polar spherical coordinate, i.e. the angle \(\theta \in [0, \pi]\) from the positive z-axis to a point on the sphere, according to the ISO 31-11 standard [Weisstein, 2005].
Return the radial spherical coordinate, i.e. the distance from a point on the sphere to the origin, according to the ISO 31-11 standard [Weisstein, 2005].
Return or set the x coordinates.
Return the coordinates as three arrays, useful for plotting.
Return or set the y coordinates.
Return or set the z coordinate.
Calculate the angles between these vectors in other vectors.
The cross product of a vector with another vector.
Return the dot products of the vectors and the other vectors.
Vector3d.dot_outer(other[, lazy, ...])
Return the outer dot products of all vectors and all the other vectors.
Vector3d.draw_circle([projection, figure, ...])
Draw great or small circles with a given
opening_angleto to the vectors in the stereographic projection.
Vector3d.from_polar(azimuth, polar[, radial])
Get vectors delineating great or small circle(s) with a given
opening_angleabout each vector.
Vector3d.get_nearest(x[, inclusive, tiebreak])
Return the vector in
xwith the smallest angle to this vector.
Project vectors to a symmetry's fundamental sector (inverse pole figure).
Plot the Inverse Pole Density Function (IPDF) within the fundamental sector of a given point group symmetry in the stereographic projection.
Return the mean vector.
Plot the Pole Density Function (PDF) on a given hemisphere in the stereographic projection.
Convenience function for rotating this vector.
Vector3d.scatter([projection, figure, ...])
Plot vectors in the stereographic projection.
Return the azimuth \(\phi\), polar \(\theta\), and radial \(r\) spherical coordinates, the angles in radians.
Return a unit vector in the x-direction.
Return a unit vector in the y-direction.
Return zero vectors in the specified shape.
Return a unit vector in the z-direction.