 Reference documentation for deal.II version GIT ffb4c3937f 2023-03-31 14:25:02+00:00
Physics::Transformations::Rotations Namespace Reference

## Functions

Rotation matrices
template<typename Number >
Tensor< 2, 2, Number > rotation_matrix_2d (const Number &angle)

template<typename Number >
Tensor< 2, 3, Number > rotation_matrix_3d (const Tensor< 1, 3, Number > &axis, const Number &angle)

template<typename Number >
Tensor< 2, 3, Number > rotation_matrix_3d (const Point< 3, Number > &axis, const Number &angle)

## Detailed Description

Transformation functions and tensors that are defined in terms of rotation angles and axes of rotation.

## ◆ rotation_matrix_2d()

template<typename Number >
 Tensor<2, 2, Number> Physics::Transformations::Rotations::rotation_matrix_2d ( const Number & angle )

Return the rotation matrix for 2-d Euclidean space, namely

$\mathbf{R} \dealcoloneq \left[ \begin{array}{cc} cos(\theta) & -sin(\theta) \\ sin(\theta) & cos(\theta) \end{array}\right]$

where $$\theta$$ is the rotation angle given in radians. In particular, this describes the counter-clockwise rotation of a vector relative to a fixed set of right-handed axes.

Parameters

## ◆ rotation_matrix_3d() [1/2]

template<typename Number >
 Tensor<2, 3, Number> Physics::Transformations::Rotations::rotation_matrix_3d ( const Tensor< 1, 3, Number > & axis, const Number & angle )

Return the rotation matrix for 3-d Euclidean space. Most concisely stated using the Rodrigues' rotation formula, this function returns the equivalent of

$\mathbf{R} \dealcoloneq cos(\theta)\mathbf{I} + sin(\theta)\mathbf{W} + (1-cos(\theta))\mathbf{u}\otimes\mathbf{u}$

where $$\mathbf{u}$$ is the axial vector (an axial vector) and $$\theta$$ is the rotation angle given in radians, $$\mathbf{I}$$ is the identity tensor and $$\mathbf{W}$$ is the skew symmetric tensor of $$\mathbf{u}$$.

Note
For a discussion of the background of this function, see P. Wriggers: "Nonlinear finite element methods" (2008), and in particular formula (9.194) on p. 374 (or thereabouts). This presents Rodrigues' rotation formula, but the implementation used in this function is described in this wikipedia link. In particular, this describes the counter-clockwise rotation of a vector in a plane with its normal. defined by the axis of rotation. An alternative implementation is discussed at this link, but is inconsistent (sign-wise) with the Rodrigues' rotation formula as it describes the rotation of a coordinate system.
Parameters
 [in] axis A unit vector that defines the axis of rotation [in] angle The rotation angle in radians

## ◆ rotation_matrix_3d() [2/2]

template<typename Number >
 Tensor<2, 3, Number> Physics::Transformations::Rotations::rotation_matrix_3d ( const Point< 3, Number > & axis, const Number & angle )

Return the rotation matrix for 3-d Euclidean space. Most concisely stated using the Rodrigues' rotation formula, this function returns the equivalent of

$\mathbf{R} \dealcoloneq cos(\theta)\mathbf{I} + sin(\theta)\mathbf{W} + (1-cos(\theta))\mathbf{u}\otimes\mathbf{u}$

where $$\mathbf{u}$$ is the axial vector (an axial vector) and $$\theta$$ is the rotation angle given in radians, $$\mathbf{I}$$ is the identity tensor and $$\mathbf{W}$$ is the skew symmetric tensor of $$\mathbf{u}$$.

Note
For a discussion of the background of this function, see P. Wriggers: "Nonlinear finite element methods" (2008), and in particular formula (9.194) on p. 374 (or thereabouts). This presents Rodrigues' rotation formula, but the implementation used in this function is described in this wikipedia link. In particular, this describes the counter-clockwise rotation of a vector in a plane with its normal. defined by the axis of rotation. An alternative implementation is discussed at this link, but is inconsistent (sign-wise) with the Rodrigues' rotation formula as it describes the rotation of a coordinate system.
Parameters
 [in] axis A unit vector that defines the axis of rotation [in] angle The rotation angle in radians
Deprecated:
Use the variant with a Tensor as an axis.