pytransform3d.rotations.random_axis_angle#

pytransform3d.rotations.random_axis_angle(rng=Generator(PCG64) at 0x7E3407968F20)[source]#

Generate random axis-angle.

The angle will be sampled uniformly from the interval \([0, \pi)\) and each component of the rotation axis will be sampled from \(\mathcal{N}(\mu=0, \sigma=1)\) and then the axis will be normalized to length 1.

Parameters:
rngnp.random.Generator, optional (default: random seed 0)

Random number generator

Returns:
aarray, shape (4,)

Axis of rotation and rotation angle: (x, y, z, angle)

Examples using pytransform3d.rotations.random_axis_angle#

Axis-Angle Representation of Rotation

Axis-Angle Representation of Rotation

Plot Transformed Cylinders

Plot Transformed Cylinders

Plot Box

Plot Box

Visualize Transformed Cylinders

Visualize Transformed Cylinders