spin3d                  package:rgl                  R Documentation

_C_r_e_a_t_e _a _f_u_n_c_t_i_o_n _t_o _s_p_i_n _a _s_c_e_n_e _a_t _a _f_i_x_e_d _r_a_t_e

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

     This creates a function to use with 'play3d' to spin an rgl scene
     at a fixed rate.

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

     spin3d(axis = c(0, 0, 1), rpm = 5)

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

    axis: The desired axis of rotation 

     rpm: The rotation speed in rotations per minute 

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

     A function with header 'function(time)'.  This function calculates
     and returns a list containing 'userMatrix' updated by spinning it
     for 'time' seconds at 'rpm' revolutions per minute about the
     specified 'axis'.

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

     Duncan Murdoch

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

     'play3d' to play the animation

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

     open3d()
     plot3d(oh3d(col="lightblue", alpha=0.5))
     play3d(spin3d(axis=c(1,0,0), rpm=20), duration=3)

