# eul2rot: Construct a rotation matrix on SO(3) from the Euler angles. In Directional: Directional Statistics

## Description

It forms a rotation matrix X on SO(3) by using three Euler angles (θ_{12}, θ_{13}, θ_{23}), where X is defined as X=R_z(θ_{12}) \times R_y(θ_{13}) \times R_x( θ_{23} ). Here R_x (θ_{23}) means a rotation of θ_{23} radians about the x axis.

## Usage

 1 eul2rot(theta.12, theta.23, theta.13) 

## Arguments

 theta.12 An Euler angle, a number which must lie in (-π, π). theta.23 An Euler angle, a number which must lie in (-π, π). theta.13 An Euler angle, a number which must lie in (-π/2, π/2).

## Details

Given three euler angles a rotation matrix X on SO(3) is formed using the transformation according to Green and Mardia (2006) which is defined above.

## Value

A roation matrix.

## Author(s)

Anamul Sajib<[email protected]>

R implementation and documentation: Anamul Sajib<[email protected]>

## References

Green, P. J. \& Mardia, K. V. (2006). Bayesian alignment using hierarchical models, with applications in proteins bioinformatics. Biometrika, 93(2):235–254.

rot2eul 

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # three euler angles theta.12 <- sample( seq(-3, 3, 0.3), 1 ) theta.23 <- sample( seq(-3, 3, 0.3), 1 ) theta.13 <- sample( seq(-1.4, 1.4, 0.3), 1 ) theta.12 ; theta.23 ; theta.13 X <- eul2rot(theta.12, theta.23, theta.13) X # A rotation matrix det(X) e <- rot2eul(X)\$v1 theta.12 <- e[3] theta.23 <- e[2] theta.13 <- e[1] theta.12 ; theta.23 ; theta.13 

### Example output

[1] -1.8
[1] 0.3
[1] 0.4
[,1]       [,2]       [,3]
[1,] -0.2092670  0.9564988 -0.2032667
[2,] -0.8969731 -0.1049831  0.4294390
[3,]  0.3894183  0.2721921  0.8799232
[1] 1
[1] -1.8
[1] 0.3
[1] 0.4


Directional documentation built on Nov. 12, 2018, 5:05 p.m.