Skip to contents

Abstract class for vectors of various representations of SO(3) (orientation) objects.

Objects from the Class

A virtual Class: No objects may be created from it.

Methods

coerce

Methods are defined to coerce orientation objects to any concrete descendant class.

%*%

Matrix multiplication acts on orientation objects component by component, producing compositions of the rotations.

^

An orientation is raised to a power by multiplying its component rotation angles by that power.

t

The transpose of an orientation object is its component by component inverse.

mean

The mean of an orientation object is the nearest SO(3) matrix to the element-by-element mean of its 3 x 3 rotation matrix representation.

weighted.mean

The weighted mean, defined analogously to the mean.

Author

Duncan Murdoch

Examples

x <- rotmatrix(diag(3))
x
#> An object of class "rotmatrix"
#> Slot "x":
#> , , 1
#> 
#>      [,1] [,2] [,3]
#> [1,]    1    0    0
#> [2,]    0    1    0
#> [3,]    0    0    1
#> 
#> 
rotvector(x)
#> An object of class "rotvector"
#> Slot "x":
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
#> [1,]    1    0    0    0    1    0    0    0    1
#> 
eulerzyx(x)
#> An object of class "eulerzyx"
#> Slot "x":
#>      psi theta phi
#> [1,]   0     0   0
#> 
eulerzxz(x)
#> An object of class "eulerzxz"
#> Slot "x":
#>      phi theta psi
#> [1,]   0     0   0
#> 
quaternion(x)
#> An object of class "quaternion"
#> Slot "x":
#>      q1 q2 q3 q4
#> [1,]  0  0  0  1
#>