APIs#

computing_methods.first_module.rot_axis(vector: ndarray[tuple[Any, ...], dtype[float64]], angle: float, axis: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]][source]#

Rotate a vector [x, y, z] around a given axis by a certain angle.

Parameters#

vector (np.ndarray):

Vector to rotate

angle (float):

Angle in radians of the rotation

axis (np.ndarray):

Axis around which the rotation is made

Returns#

np.ndarray

Rotated vector

computing_methods.first_module.rot_angle(vec1: ndarray[tuple[Any, ...], dtype[float64]], vec2: ndarray[tuple[Any, ...], dtype[float64]]) float[source]#

Compute the angle between two vectors [x, y, z].

Parameters#

vec1np.ndarray

First vector

vec2np.ndarray

Second vector

Returns#

float

Angle between the vectors in radians

computing_methods.first_module.find_perp(vec1: ndarray[tuple[Any, ...], dtype[float64]], vec2: ndarray[tuple[Any, ...], dtype[float64]]) ndarray[tuple[Any, ...], dtype[float64]][source]#

Find a vector perpendicular to two given vectors [x, y, z] (right hand rule).

Parameters#

vec1np.ndarray

First vector

vec2np.ndarray

Second vector

Returns#

np.ndarray

Perpendicular vector