Save the date! Google I/O returns May 18-20 Register now

Module: tfg.geometry.transformation.axis_angle

This module implements axis-angle functionalities.

The axis-angle representation is defined as


, where


is a unit vector indicating the direction of rotation and


is a scalar controlling the angle of rotation. It is important to note that the axis-angle does not perform rotation by itself, but that it can be used to rotate any given vector

$$\mathbf{v} \in {\mathbb{R}^3}$$

into a vector


using the Rodrigues' rotation formula:

$$\mathbf{v}'=\mathbf{v}\cos(\theta)+(\mathbf{a}\times\mathbf{v})\sin(\theta) +\mathbf{a}(\mathbf{a}\cdot\mathbf{v})(1-\cos(\theta)).$$

More details about the axis-angle formalism can be found on this page.

$$\mathbf{a} = [x, y, z]^T$$

as inputs where

$$x^2 + y^2 + z^2 = 1$$



from_euler(...): Converts Euler angles to an axis-angle representation.

from_euler_with_small_angles_approximation(...): Converts small Euler angles to an axis-angle representation.

from_quaternion(...): Converts a quaternion to an axis-angle representation.

from_rotation_matrix(...): Converts a rotation matrix to an axis-angle representation.

inverse(...): Computes the axis-angle that is the inverse of the input axis-angle.

is_normalized(...): Determines if the axis-angle is normalized or not.

rotate(...): Rotates a 3d point using an axis-angle by applying the Rodrigues' formula.