diff --git a/dir_12c6a5b07df34aef879622d954c76196.html b/dir_12c6a5b07df34aef879622d954c76196.html index a4cb311b..b4b3ecc4 100644 --- a/dir_12c6a5b07df34aef879622d954c76196.html +++ b/dir_12c6a5b07df34aef879622d954c76196.html @@ -130,6 +130,8 @@ Directories
Functions performing computations over all cayley-dicson types, complex, quaternions and octonions... +
Functions performing computations over all caylet-dickson types complex, quaternions, octonions... More...
@@ -184,6 +184,9 @@
constexpr tags::callable_dist | kyosu::dist = {} | | Computes the distance between the two parameters. | | constexpr tags::callable_exp | kyosu::exp = {} | | Computes the exponential of the argument. | constexpr tags::callable_is_real | kyosu::is_real = {} | | test if the parameter is real. | | constexpr tags::callable_jpart | kyosu::jpart = {} | | Extracts the \(j\) part of a value. | constexpr tags::callable_sinpicospi | kyosu::sinpicospi = {} | | Computes simultaneously the sine and cosine of the argument in \(\pi\) mutiples. | | constexpr tags::callable_sqr | kyosu::sqr = {} | | Computes the square value. | |
+
|
+ +inlineconstexpr | +
test if the parameter is unitary (absolute value one).
+Defined in Header
+Parameters
+z
: Value to process.Return value
+Returns elementwise true if an element is of absolute value one.
+
+
|
+ +inlineconstexpr | +
Computes the spherical interpolation between unitary quaternions.
+Defined in Header
+Parameters
+z0, z1
: unitary quaternions to process.t
: floating value interpolation coefficient.Return value
+The value of the spherical interpolation (or extrapolation) between z0
and z1
is returned. The functions asserts if the quaternions are not unitary.
Parameters
+
|
+ +inlineconstexpr | +
Computes elementwise the dot product of the coordinates of the corresponding element.
+Defined in Header
+Parameters
+z0, z1
: Value to process.Return value
+Returns the dot product of z0 and z1. If z0 and z1 are floating point this is equivalent to z0*z1.
+dot(z0, z0)
is always semantically equivalent to sqr_abs(z0)
.
+Variables | |
constexpr tags::callable_from_angle_axis | kyosu::from_angle_axis = {} |
Callable object computing a quaternion from its angle_axis representation. | |
constexpr tags::callable_from_cylindrical | kyosu::from_cylindrical = {} |
Callable object computing a quaternion from its cylindrical representation. | |
constexpr tags::callable_from_cylindrospherical | kyosu::from_cylindrospherical = {} |
Callable object computing a quaternion from its cylindrospherical representation. | |
constexpr tags::callable_from_euler | kyosu::from_euler = {} |
Callable object computing a quaternion from its euler representation. | |
constexpr tags::callable_from_rotation_matrix | kyosu::from_rotation_matrix = {} |
Callable object computing a quaternion from its rotation_matrix representation. | |
constexpr tags::callable_from_semipolar | kyosu::from_semipolar = {} |
Callable object computing a quaternion from its semipolar representation. | |
constexpr tags::callable_from_spherical | kyosu::from_spherical = {} |
Callable object computing a quaternion from its spherical representation. | |
constexpr tags::callable_to_euler | kyosu::to_euler = {} |
Callable object computing euler angles from a quaternion. | |
constexpr tags::callable_to_rotation_matrix | kyosu::to_rotation_matrix = {} |
Callable object computing a quaternion from its to_rotation_matrix representation. | |
+
|
+ +inlineconstexpr | +
Callable object computing a quaternion from its cylindrical representation.
+This function build quaternions in a way similar to the way polar builds complex numbers from a cylindrical representation of an \(\mathbb{R}^2\) element.
+from_cylindrical first two inputs are the polar coordinates of the first \(\mathbb{C}\) component of the quaternion. The third and fourth inputs are placed into the third and fourth \(\mathbb{R}\) components of the quaternion, respectively.
+Defined in header
+Parameters
+r
, angle,
h1,
h2`Return value
+the quaternion value.
+
+
|
+ +inlineconstexpr | +
Callable object computing a quaternion from its cylindrospherical representation.
+cylindrospherical is specific to quaternions. It is often interesting to consider \(\mathbb{H}\) as the cartesian product of \(\mathbb{R}\) by \(\mathbb{R3}\) (the quaternionic multiplication has then a special form, as given here). This function therefore builds a quaternion from this representation, with the \(\mathbb{R3}\) component given in usual \(\mathbb{R3}\) spherical coordinates.
+Defined in header
+Parameters
+t
, radius
: the modulilongitude
, latitude
: angles in radianReturn value
+the quaternion value
+
+
|
+ +inlineconstexpr | +
Callable object computing a quaternion from its euler representation.
+This function build euler angles from 3 euler angles in radian. Template parameters I, J, K of type int are used to choose the euler axis order.
+for instance I = 3, J = 2, K = 3 choose the ZYZ sequence. the values of I, J, and K must be in {1, 2, 3} ans satisfy I != J && J != K.
+Defined in header
+Parameters
+a
, b
, c
: the angles in radiana1
, a2
, a3
the axis parameters to be chosen between X_, Y_, Z_ (two consecutive axis cannot be the same)Template parameters
+The computation method is taken from the article : "Quaternion to Euler angles conversion: A + direct, general and computationally efficient method". PLoS ONE 17(11): e0276302. https://doi.org/10.1371/journal pone 0276302. Evandro Bernardes, and Stephane Viollet
+Return value
+quaternion representing the rotation
+
+
|
+ +inlineconstexpr | +
Callable object computing a quaternion from its semipolar representation.
+This function build quaternions in a way similar to the way polar builds complex numbers from a semipolar representation of an \(\mathbb{R}^2\) element.
+from_semipolar first two inputs are the polar coordinates of the first \(\mathbb{C}\) component of the quaternion. The third and fourth inputs are placed into the third and fourth \(\mathbb{R}\) components of the quaternion, respectively.
+Defined in header
+Parameters
+r
, angle,
h1,
h2`Return value
+the quaternion value.
+This function build quaternions in a way similar to the way polar builds complex numbers from a semipolar representation of an \(\mathbb{R}^4\) element.
+from_semipolar takes as a first input the magnitude of the quaternion, as a second input an angle in the range 0 to \(\pi/2\) such that magnitudes of the first two \(\mathbb{C}\) components of the quaternion are the product of the first input and the sine and cosine of this angle, respectively, and finally as third and fourth inputs angles in the range \(-\pi/2\) to \(+\pi/2\) which represent the arguments of the first and second \(\mathbb{C}\) components of the quaternion, respectively.
+Defined in header
+Parameters
+rho
: the modulusalpha
, theta1
, theta2
: angles in radianReturn value
+the quaternion value representing the \(\R^4\) element.
+
+
|
+ +inlineconstexpr | +
Callable object computing a quaternion from its to_rotation_matrix representation.
+This function build rotation_matrix angles from a quaternion. Template parameters I, J, K of type int are used to choose the rotation_matrix order.
+for instance I = 3, J = 2, K = 3 choose the ZYZ sequence. the values of I, J, and K must be in {1, 2, 3} ans satisfy I != J && J != K.
+Defined in header
+Parameters
+q
quaternion representing the rotationassume_normalized
`: suppose that q is already normalizedReturn value
+compute the rotation matrix associated to the quaternion.
+if T is the element type of q, returns an std::array<std::array<T, 3>, 3> containing the 9 coefficients of the rotation matrix
+
+
|
+ +inlineconstexpr | +
Callable object computing euler angles from a quaternion.
+This function build euler angles from a quaternion. Template parameters I, J, K of type int are used to choose the euler order.
+for instance I = 3, J = 2, K = 3 choose the ZYZ sequence. the values of I, J, and K must be in {1, 2, 3} ans satisfy I != J && J != K.
+Defined in header
+Parameters
+q
the rotation quaternion (not necesseraly normalized)a1
, a2
, a3
: the axis parameters to be chosen between X_, Y_, Z_ (two consecutive axis cannot be the same)Template parameters
+The computation method is taken from the article : "Quaternion to Euler angles conversion: A + direct, general and computationally efficient method". PLoS ONE 17(11): e0276302. https://doi.org/10.1371/journal pone 0276302. Evandro Bernardes, and Stephane Viollet
+Return value
+kumi tuple of the three euler angles in radian. In case of singularity the first angle is 0.
+
+
|
+ +inlineconstexpr | +
Callable object computing a quaternion from its spherical representation.
+This function build quaternions in a way similar to the way polar builds complex numbers from a spherical representation of an \(\mathbb{R}^4\) element.
+from_spherical takes as inputs a (positive) magnitude and a point on the hypersphere, given by three angles. The first of these, theta has a natural range of \(-\pi\) to \(+\pi\), and the other two have natural ranges of \(-\pi/2\) to \(+\pi/2\) (as is the case with the usual spherical coordinates in \(\mathbb{R}^3\)).
+Defined in header
+Parameters
+rho
: the modulustheta
, 'phi1, 'phi2
: angles in radianReturn value
+the quaternion value
+
+
|
+ +inlineconstexpr | +
Callable object computing a quaternion from its angle_axis representation.
+This function build an unitary quaternion from an angle value and a 3 dimensionnal axis vector
+Defined in header
+Parameters
+angle
: rotation angle in radianaxis
` : rotation axis given by an std::span of dimension 3.Return value
+the quaternion value representing the rotation.
+
+
|
+ +inlineconstexpr | +
Callable object computing a quaternion from its rotation_matrix representation.
+This function returns a quaternion associated to the input rotation matrix m. If m is not a proper rotation 3x3 rotation matrix (i.e an orthogonal matrix with determinant 1) the result is undefined.
+Defined in header
+Parameters
+m
the rotation matrix. The actual implementation assumes that m[i][j] will return the ith line and jth column element of the matrix (indices starting from 0).
The computation method is inspired from the article : "Accurate Computation of + Quaternions from Rotation Matrices", by Soheil Sarabandi and Federico Thomas Institut de Robotica i Informatica Industrial (CSIC-UPC) Llorens Artigas 4-6, 08028 Barcelona, Spain.
+Return value
+an unitary quaternion representing the rotation
+