viewpoint                package:rgl                R Documentation

_S_e_t _u_p _v_i_e_w_p_o_i_n_t

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

     Set the viewpoint orientation.

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

     view3d( theta = 0, phi = 15, ...)
     rgl.viewpoint( theta = 0, phi = 15, fov = 60, zoom = 1, scale = par3d("scale"), 
                    interactive = TRUE, userMatrix )

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

theta,phi: polar coordinates

     ...: additional parameters to pass to 'rgl.viewpoint'

     fov: field-of-view angle

    zoom: zoom factor

   scale: real length 3 vector specifying the rescaling to apply to
          each axis

interactive: logical, specifying if interactive navigation is allowed

userMatrix: 4x4 matrix specifying user point of view

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

     The viewpoint can be set in an orbit around the data model, using
     the polar coordinates '\theta' and 'phi'.  Alternatively, it can
     be set in a completely general way using the 4x4 matrix
     'userMatrix'.  If 'userMatrix' is specified, 'theta' and 'phi' are
     ignored.

     The pointing device of your graphics user-interface can also be
     used to  set the viewpoint interactively. With the pointing device
     the buttons are by default set as follows:

   _l_e_f_t adjust viewpoint position

   _m_i_d_d_l_e adjust field of view angle

   _r_i_g_h_t _o_r _w_h_e_e_l adjust zoom factor

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

     'par3d'

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

     # animated round trip tour for 10 seconds

     rgl.open()
     shade3d(oh3d(), color="red")

     start <- proc.time()[3]
     while ((i <- 36*(proc.time()[3]-start)) < 360) {
       rgl.viewpoint(i,i/4); 
     }

