quaternion             package:orientlib             R Documentation

_C_r_e_a_t_e _a_n _o_r_i_e_n_t_a_t_i_o_n _u_s_i_n_g _q_u_a_t_e_r_n_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Creates a 'quaternion-class' object.

_U_s_a_g_e:

     quaternion(m)

_A_r_g_u_m_e_n_t_s:

       m: n x 4 matrix or 4 element vector containing a unit
          quaternion, or an orientation object 

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     A 'quaternion-class' object.

_A_u_t_h_o_r(_s):

     Duncan Murdoch

_S_e_e _A_l_s_o:

     'quaternion-class', 'rotmatrix', 'rotvector', 'eulerzyx',
     'eulerzxz', 'skewvector', 'skewmatrix'

_E_x_a_m_p_l_e_s:

     x <- quaternion(c(1,0,0,0))
     x
     rotmatrix(x)

