rotate                 package:onion                 R Documentation

_R_o_t_a_t_e_s _3_D _v_e_c_t_o_r_s  _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:

     Rotates a three-column matrix whose rows are vectors in 3D space,
     using quaternions

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

     rotate(x, H)

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

       x: A matrix of three columns whose rows are points in 3D space

       H: A quaternion.  Does not need to have unit modulus

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

     Returns a matrix of the same size as 'x'

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

     Robin K. S. Hankin

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

     data(bunny)
     par(mfrow=c(2,2))
     par(mai=rep(0,4))
     p3d(rotate(bunny,Hi),box=FALSE)
     p3d(rotate(bunny,H1-Hi+Hj),box=FALSE)
     p3d(rotate(bunny,Hk),box=FALSE)
     p3d(rotate(bunny,Hall),box=FALSE)

