Skip to contents

Creates an eulerzxz-class object.

Usage

eulerzxz(phi, theta, psi)

Arguments

phi

Rotation about Z axis

theta

Rotation about X axis

psi

Further rotation about Z axis

Details

The rotations are expressed in radians and applied in the order Z, X, Z.

If theta and psi are missing, phi is taken to be an n x 3 matrix (or 3 element vector) holding all 3 Euler angles; alternatively, it may be an orientation object.

Value

An eulerzxz-class object.

Author

Duncan Murdoch

Examples

x <- eulerzxz(c(1,0,0), c(0,1,0), c(0,0,1))
x
#> An object of class "eulerzxz"
#> Slot "x":
#>      phi theta psi
#> [1,]   1     0   0
#> [2,]   0     1   0
#> [3,]   0     0   1
#> 
rotmatrix(x)
#> An object of class "rotmatrix"
#> Slot "x":
#> , , 1
#> 
#>            [,1]      [,2] [,3]
#> [1,]  0.5403023 0.8414710    0
#> [2,] -0.8414710 0.5403023    0
#> [3,]  0.0000000 0.0000000    1
#> 
#> , , 2
#> 
#>      [,1]       [,2]      [,3]
#> [1,]    1  0.0000000 0.0000000
#> [2,]    0  0.5403023 0.8414710
#> [3,]    0 -0.8414710 0.5403023
#> 
#> , , 3
#> 
#>            [,1]      [,2] [,3]
#> [1,]  0.5403023 0.8414710    0
#> [2,] -0.8414710 0.5403023    0
#> [3,]  0.0000000 0.0000000    1
#> 
#>