pytransform3d.rotations.random_vector#

pytransform3d.rotations.random_vector(rng=Generator(PCG64) at 0x7E3407969380, n=3)[source]#

Generate an nd vector with normally distributed components.

Each component will be sampled from \(\mathcal{N}(\mu=0, \sigma=1)\).

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

Random number generator

nint, optional (default: 3)

Number of vector components

Returns:
varray, shape (n,)

Random vector

Examples using pytransform3d.rotations.random_vector#

Construct Rotation Matrix from Two Vectors

Construct Rotation Matrix from Two Vectors