vector2xy#

classmethod GnomonicProjection.vector2xy(v: Union[Vector3d, ndarray]) ndarray[source]#

Convert from 3D cartesian coordinates \((x, y, z)\) to 2D Gnomonic coordinates \((x_g, y_g)\).

Parameters:
v

3D vector(s) on the form [[x0, y0, z0], [x1, y1, z1], ...].

Returns:
gnomonic_coordinates

Gnomonic coordinates on the form [[x0, y0], [x1, y1], ...].

Examples

>>> import numpy as np
>>> from kikuchipy.projections import GnomonicProjection
>>> v = np.random.random_sample(30).reshape((10, 3))
>>> xy = GnomonicProjection.vector2xy(v)