quat2rot: Converting an unsigned unit quaternion to rotation matrix on...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/quat2rot.R

Description

It forms a (3 x 3) rotation matrix on SO(3) from an unsigned unite quaternion in S^3 (the four-dimensional sphere).

Usage

1

Arguments

x

An unsigned unit quaternion in S^3.

Details

Given an unsigned unit quaternion in S^3 it forms a rotation matrix on SO(3), according to the transformation proposed by Prentice (1986).

Value

A rotation matrix.

Author(s)

Anamul Sajib

R implementation and documentation: Anamul Sajib <sajibstat@du.ac.bd>

References

Prentice,M. J. (1986). Orientation statistics without parametric assumptions.Journal of the Royal Statistical Society. Series B: Methodological 48(2).

See Also

rot2quat, rotation, Arotation rot.matrix

Examples

1
2
3
4
x <- rnorm(4)
x <- x/sqrt( sum(x^2) )
x                   ## an unit quaternion in R4 ##
quat2rot(x)

Example output

sh: 1: wc: Permission denied
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. 
[1]  0.3066565  0.4073779  0.1588596 -0.8454399
            [,1]       [,2]       [,3]
[1,]  0.61761378  0.5184627 -0.5913964
[2,] -0.01876237  0.7614508  0.6479511
[3,]  0.78625772 -0.3890875  0.4800101

Directional documentation built on Nov. 8, 2021, 1:07 a.m.