quaternion | R Documentation |
Creates a quaternion-class
object.
quaternion(m)
m |
n x 4 matrix or 4 element vector containing a unit quaternion, or an orientation object |
The rows of m
are 4 element unit vectors interpreted as
follows: the first 3 (x,y,z)
define the axis of rotation,
and the last element gives the cosine of half the angle of
rotation in a counter-clockwise direction when looking down the
axis towards the origin.
A quaternion-class
object.
Duncan Murdoch
quaternion-class
, rotmatrix
, rotvector
, eulerzyx
,
eulerzxz
, skewvector
, skewmatrix
x <- quaternion(c(1,0,0,0)) x rotmatrix(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.