SpecialOrthogonal3Vectors | R Documentation |
Class for the special orthogonal group \mathrm{SO}(3) in
vector form, i.e. the Lie group of 3D rotations. This class is specific to
the vector representation of rotations. For the matrix representation, use
the SpecialOrthogonal
class and set n = 3
.
rgeomstats::PythonClass
-> rgeomstats::Manifold
-> rgeomstats::LieGroup
-> rgeomstats::SpecialOrthogonalVectors
-> SpecialOrthogonal3Vectors
bi_invariant_metric
An object of class BiInvariantMetric
specifying the metric to equip the manifold with.
SpecialOrthogonal3Vectors$quaternion_from_tait_bryan_angles()
SpecialOrthogonal3Vectors$rotation_vector_from_tait_bryan_angles()
SpecialOrthogonal3Vectors$tait_bryan_angles_from_quaternion()
SpecialOrthogonal3Vectors$tait_bryan_angles_from_rotation_vector()
rgeomstats::PythonClass$get_python_class()
rgeomstats::PythonClass$set_python_class()
rgeomstats::Manifold$belongs()
rgeomstats::Manifold$is_tangent()
rgeomstats::Manifold$random_point()
rgeomstats::Manifold$random_tangent_vec()
rgeomstats::Manifold$regularize()
rgeomstats::Manifold$set_metric()
rgeomstats::Manifold$to_tangent()
rgeomstats::LieGroup$add_metric()
rgeomstats::LieGroup$compose()
rgeomstats::LieGroup$exp()
rgeomstats::LieGroup$exp_from_identity()
rgeomstats::LieGroup$exp_not_from_identity()
rgeomstats::LieGroup$get_identity()
rgeomstats::LieGroup$inverse()
rgeomstats::LieGroup$jacobian_translation()
rgeomstats::LieGroup$lie_bracket()
rgeomstats::LieGroup$log()
rgeomstats::LieGroup$log_from_identity()
rgeomstats::LieGroup$log_not_from_identity()
rgeomstats::LieGroup$tangent_translation_map()
rgeomstats::SpecialOrthogonalVectors$projection()
rgeomstats::SpecialOrthogonalVectors$regularize_tangent_vec()
rgeomstats::SpecialOrthogonalVectors$regularize_tangent_vec_at_identity()
rgeomstats::SpecialOrthogonalVectors$skew_matrix_from_vector()
rgeomstats::SpecialOrthogonalVectors$vector_from_skew_matrix()
new()
The SpecialOrthogonal3Vectors
class constructor.
SpecialOrthogonal3Vectors$new(epsilon = 0, py_cls = NULL)
epsilon
A numeric value specifying the precision to use for
calculations involving potential division by 0 in rotations. Defaults to
0
.
py_cls
A Python object of class SpecialOrthogonal3Vectors
.
Defaults to NULL
in which case it is instantiated on the fly using
the other input arguments.
An object of class SpecialOrthogonal3Vectors
.
rotation_vector_from_matrix()
Converts a 3D rotation from matrix to axis-angle representation.
SpecialOrthogonal3Vectors$rotation_vector_from_matrix(rot_mat)
rot_mat
A numeric array of shape [… \times 3 \times 3] specifying one or more 3D rotation matrices.
Gets the angle θ through the trace of the rotation matrix. The eigenvalues are:
\{ 1, \cos θ + i \sin θ, \cos θ - i \sin θ \}
so that
\mathrm{trace} = 1 + 2 \cos θ, \{ -1 ≤q \mathrm{trace} ≤q 3 \}.
The rotation vector is the vector associated to the skew-symmetric matrix
S_r = \frac{θ}{(2 \sin θ) (R - R^T)}.
For the edge case where the angle is close to π, the rotation vector (up to sign) is derived by using the following equality (see the axis-angle representation on Wikipedia):
\mathrm{outer}(r, r) = \frac{1}{2} (R + I_3).
In nD, the rotation vector stores the n(n-1)/2 values of the skew-symmetric matrix representing the rotation.
A numeric array of shape [… \times 3] storing the corresponding axis-angle representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$rotation_vector_from_matrix(diag(1, 3)) }
matrix_from_rotation_vector()
Converts a 3D rotation from axis-angle to matrix representation.
SpecialOrthogonal3Vectors$matrix_from_rotation_vector(rot_vec)
rot_vec
A numeric array of shape [… \times 3] specifying one or more 3D rotations in axis-angle representation.
A numeric array of shape [… \times 3 \times 3] storing the corresponding matrix representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$matrix_from_rotation_vector(rep(0, 3)) }
quaternion_from_matrix()
Converts a 3D rotation from matrix to unit quaternion representation.
SpecialOrthogonal3Vectors$quaternion_from_matrix(rot_mat)
rot_mat
A numeric array of shape [… \times 3 \times 3] specifying one or more 3D rotations in matrix representation.
A numeric array of shape [… \times 4] storing the corresponding unit quaternion representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$quaternion_from_matrix(diag(1, 3)) }
quaternion_from_rotation_vector()
Converts a 3D rotation from axis-angle to unit quaternion representation.
SpecialOrthogonal3Vectors$quaternion_from_rotation_vector(rot_vec)
rot_vec
A numeric array of shape [… \times 3] specifying one or more 3D rotations in axis-angle representation.
A numeric array of shape [… \times 4] storing the corresponding unit quaternion representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$quaternion_from_rotation_vector(rep(0, 3)) }
rotation_vector_from_quaternion()
Converts a 3D rotation from unit quaternion to axis-angle representation.
SpecialOrthogonal3Vectors$rotation_vector_from_quaternion(quaternion)
quaternion
A numeric array of shape [… \times 4] specifying one or more 3D rotations in unit quaternion representation.
A numeric array of shape [… \times 3] storing the corresponding axis-angle representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$rotation_vector_from_quaternion(array(c(1, rep(0, 3)))) }
matrix_from_quaternion()
Converts a 3D rotation from unit quaternion to matrix representation.
SpecialOrthogonal3Vectors$matrix_from_quaternion(quaternion)
quaternion
A numeric array of shape [… \times 4] specifying one or more 3D rotations in unit quaternion representation.
A numeric array of shape [… \times 3 \times 3] storing the corresponding matrix representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$matrix_from_quaternion(c(1, rep(0, 3))) }
matrix_from_tait_bryan_angles()
Converts a 3D rotation from Tait-Bryan angle to matrix representation.
SpecialOrthogonal3Vectors$matrix_from_tait_bryan_angles( tait_bryan_angles, extrinsic_or_intrinsic = "extrinsic", order = "zyx" )
tait_bryan_angles
A numeric array of shape [… \times 3] specifying one or more 3D rotations in Tait-Bryan angle representation.
extrinsic_or_intrinsic
A character string specifying the
coordinate frame in which the Tait-Bryan angles are expressed. Choices
are either "extrinsic"
(fixed frame) or "intrinsic"
(moving frame).
Defaults to "extrinsic"
.
order
A character string specifying the order of the rotation
composition around the three axes of the chosen coordinate frame.
Choices are either "xyz"
or "zyx"
. Defaults to "zyx"
.
Converts a rotation given in terms of the Tait-Bryan angles
[angle_1, angle_2, angle_3]
in extrinsic (fixed) or intrinsic
(moving) coordinate frame in the corresponding matrix representation.
If the order is zyx
, into the rotation matrix rot_mat = X(angle_1) Y(angle_2) Z(angle_3)
where:
X(angle_1)
is a rotation of angle angle_1
around axis x
;
Y(angle_2)
is a rotation of angle angle_2
around axis y
;
Z(angle_3)
is a rotation of angle angle_3
around axis z
.
Exchanging 'extrinsic'
and 'intrinsic'
amounts to exchanging the
order.
A numeric array of shape [… \times 3 \times 3] storing the corresponding matrix representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$matrix_from_tait_bryan_angles(rep(0, 3)) }
tait_bryan_angles_from_matrix()
Converts a 3D rotation from matrix to Tait-Bryan angle representation.
SpecialOrthogonal3Vectors$tait_bryan_angles_from_matrix( rot_mat, extrinsic_or_intrinsic = "extrinsic", order = "zyx" )
rot_mat
A numeric array of shape [… \times 3 \times 3] specifying one or more 3D rotations in matrix representation.
extrinsic_or_intrinsic
A character string specifying the
coordinate frame in which the Tait-Bryan angles are expressed. Choices
are either "extrinsic"
(fixed frame) or "intrinsic"
(moving frame).
Defaults to "extrinsic"
.
order
A character string specifying the order of the rotation
composition around the three axes of the chosen coordinate frame.
Choices are either "xyz"
or "zyx"
. Defaults to "zyx"
.
Converts a rotation given in matrix representation into its
Tait-Bryan angle representation [angle_1, angle_2, angle_3]
in
extrinsic (fixed) or intrinsic (moving) coordinate frame in the
corresponding matrix representation. If the order is zyx
, into the
rotation matrix rot_mat = X(angle_1) Y(angle_2) Z(angle_3)
where:
X(angle_1)
is a rotation of angle angle_1
around axis x
;
Y(angle_2)
is a rotation of angle angle_2
around axis y
;
Z(angle_3)
is a rotation of angle angle_3
around axis z
.
Exchanging 'extrinsic'
and 'intrinsic'
amounts to exchanging the
order.
A numeric array of shape [… \times 3] storing the corresponding Tait-Bryan angle representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$tait_bryan_angles_from_matrix(diag(1, 3)) }
quaternion_from_tait_bryan_angles()
Converts a 3D rotation from Tait-Bryan angle to unit quaternion representation.
SpecialOrthogonal3Vectors$quaternion_from_tait_bryan_angles( tait_bryan_angles, extrinsic_or_intrinsic = "extrinsic", order = "zyx" )
tait_bryan_angles
A numeric array of shape [… \times 3] specifying one or more 3D rotations in Tait-Bryan angle representation.
extrinsic_or_intrinsic
A character string specifying the
coordinate frame in which the Tait-Bryan angles are expressed. Choices
are either "extrinsic"
(fixed frame) or "intrinsic"
(moving frame).
Defaults to "extrinsic"
.
order
A character string specifying the order of the rotation
composition around the three axes of the chosen coordinate frame.
Choices are either "xyz"
or "zyx"
. Defaults to "zyx"
.
A numeric array of shape [… \times 4] storing the corresponding unit quaternion representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$quaternion_from_tait_bryan_angles(rep(0, 3)) }
rotation_vector_from_tait_bryan_angles()
Converts a 3D rotation from Tait-Bryan angle to axis-angle representation.
SpecialOrthogonal3Vectors$rotation_vector_from_tait_bryan_angles( tait_bryan_angles, extrinsic_or_intrinsic = "extrinsic", order = "zyx" )
tait_bryan_angles
A numeric array of shape [… \times 3] specifying one or more 3D rotations in Tait-Bryan angle representation.
extrinsic_or_intrinsic
A character string specifying the
coordinate frame in which the Tait-Bryan angles are expressed. Choices
are either "extrinsic"
(fixed frame) or "intrinsic"
(moving frame).
Defaults to "extrinsic"
.
order
A character string specifying the order of the rotation
composition around the three axes of the chosen coordinate frame.
Choices are either "xyz"
or "zyx"
. Defaults to "zyx"
.
A numeric array of shape [… \times 3] storing the corresponding axis-angle representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$rotation_vector_from_tait_bryan_angles(rep(0, 3)) }
tait_bryan_angles_from_quaternion()
Converts a 3D rotation from matrix to Tait-Bryan angle representation.
SpecialOrthogonal3Vectors$tait_bryan_angles_from_quaternion( quaternion, extrinsic_or_intrinsic = "extrinsic", order = "zyx" )
quaternion
A numeric array of shape [… \times 4] specifying one or more 3D rotations in unit quaternion representation.
extrinsic_or_intrinsic
A character string specifying the
coordinate frame in which the Tait-Bryan angles are expressed. Choices
are either "extrinsic"
(fixed frame) or "intrinsic"
(moving frame).
Defaults to "extrinsic"
.
order
A character string specifying the order of the rotation
composition around the three axes of the chosen coordinate frame.
Choices are either "xyz"
or "zyx"
. Defaults to "zyx"
.
A numeric array of shape [… \times 3] storing the corresponding Tait-Bryan angle representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$tait_bryan_angles_from_quaternion(c(1, rep(0, 3))) }
tait_bryan_angles_from_rotation_vector()
Converts a 3D rotation from axis-angle to Tait-Bryan angle representation.
SpecialOrthogonal3Vectors$tait_bryan_angles_from_rotation_vector( rot_vec, extrinsic_or_intrinsic = "extrinsic", order = "zyx" )
rot_vec
A numeric array of shape [… \times 3] specifying one or more 3D rotations in axis-angle representation.
extrinsic_or_intrinsic
A character string specifying the
coordinate frame in which the Tait-Bryan angles are expressed. Choices
are either "extrinsic"
(fixed frame) or "intrinsic"
(moving frame).
Defaults to "extrinsic"
.
order
A character string specifying the order of the rotation
composition around the three axes of the chosen coordinate frame.
Choices are either "xyz"
or "zyx"
. Defaults to "zyx"
.
A numeric array of shape [… \times 3] storing the corresponding Tait-Bryan angle representations.
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$tait_bryan_angles_from_rotation_vector(rep(0, 3)) }
random_uniform()
Samples in \mathrm{SO}(3) from a uniform distribution.
SpecialOrthogonal3Vectors$random_uniform(n_samples = 1)
n_samples
An integer value specifying the sample size. Defaults to
1L
.
A numeric array of shape [… \times 3] storing a sample of 3D rotations in axis-angle representation uniformly sampled in \mathrm{SO}(3).
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$random_uniform() }
clone()
The objects of this class are cloneable with this method.
SpecialOrthogonal3Vectors$clone(deep = FALSE)
deep
Whether to make a deep clone.
Nicolas Guigui and Nina Miolane
Other special orthogonal classes:
SpecialOrthogonal2Vectors
,
SpecialOrthogonalMatrices
,
SpecialOrthogonal()
## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$rotation_vector_from_matrix` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$rotation_vector_from_matrix(diag(1, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$matrix_from_rotation_vector` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$matrix_from_rotation_vector(rep(0, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$quaternion_from_matrix` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$quaternion_from_matrix(diag(1, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$quaternion_from_rotation_vector` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$quaternion_from_rotation_vector(rep(0, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$rotation_vector_from_quaternion` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$rotation_vector_from_quaternion(array(c(1, rep(0, 3)))) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$matrix_from_quaternion` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$matrix_from_quaternion(c(1, rep(0, 3))) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$matrix_from_tait_bryan_angles` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$matrix_from_tait_bryan_angles(rep(0, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$tait_bryan_angles_from_matrix` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$tait_bryan_angles_from_matrix(diag(1, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$quaternion_from_tait_bryan_angles` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$quaternion_from_tait_bryan_angles(rep(0, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$rotation_vector_from_tait_bryan_angles` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$rotation_vector_from_tait_bryan_angles(rep(0, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$tait_bryan_angles_from_quaternion` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$tait_bryan_angles_from_quaternion(c(1, rep(0, 3))) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$tait_bryan_angles_from_rotation_vector` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$tait_bryan_angles_from_rotation_vector(rep(0, 3)) } ## ------------------------------------------------ ## Method `SpecialOrthogonal3Vectors$random_uniform` ## ------------------------------------------------ if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3, point_type = "vector") so3$random_uniform() }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.