Skip to contents

Creates a skewvector-class object.

Usage

skewvector(m)

Arguments

m

n x 3 matrix or 3 element vector containing a the entries of a skew-symmetric matrix, or an orientation object.

Details

The rows of m are 3 element vectors (x,y,z) interpreted as follows: the matrix exponential of the matrix ((0, -z, y), (z, 0, -x), (-y, x, 0)) is the SO(3) matrix.

Value

A skewvector-class object.

Author

Duncan Murdoch

Examples

x <- skewvector(c(1,0,0))
x
#> An object of class "skewvector"
#> Slot "x":
#>      [,1] [,2] [,3]
#> [1,]    1    0    0
#> 
rotmatrix(x)
#> An object of class "rotmatrix"
#> Slot "x":
#> , , 1
#> 
#>      [,1]       [,2]      [,3]
#> [1,]    1  0.0000000 0.0000000
#> [2,]    0  0.5403023 0.8414710
#> [3,]    0 -0.8414710 0.5403023
#> 
#> 
rotation.angle(x)
#> [1] 1