rotate_around

spherical_geometry.vector.rotate_around(x, y, z, u, v, w, theta, degrees=True)[source]

Rotates the vector (x, y, z) around the arbitrary axis defined by vector (u, v, w) by theta.

It is assumed that both (x, y, z) and (u, v, w) are already normalized.

Parameters:
x, y, zdoubles

The normalized vector to rotate

u, v, wdoubles

The normalized vector to rotate around

thetadouble, or array of doubles

The amount to rotate

degreesbool, optional

When True, theta is given in degrees, otherwise radians.

Returns:
X, Y, Zdoubles

The rotated vector