dot#

Rodrigues.dot(other: Vector3d) ndarray[source]#

Return the dot products \(D\) of the vectors.

Parameters:
other

Other vectors. Shapes must be broadcastable.

Returns:
D

Dot products.

Notes

The dot product \(D\) between \(\mathbf{v_1}\) and \(\mathbf{v_2}\) is given by

\[D = \mathbf{v_1}\cdot\mathbf{v_2} = |\mathbf{v_1}|\:|\mathbf{v_2}|\cos{\omega},\]

where \(\omega\) is the angle between the two vectors.

Examples

>>> from orix.vector import Vector3d
>>> v1 = Vector3d([0, 0, 1])
>>> v2 = Vector3d([[0, 0, 0.5], [0.4, 0.6, 0]])
>>> v1.dot(v2)
array([0.5, 0. ])
>>> v2.dot(v1)
array([0.5, 0. ])