rgl.primitive              package:rgl              R Documentation

_a_d_d _p_r_i_m_i_t_i_v_e _s_e_t _s_h_a_p_e

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

     Adds a shape node to the current scene

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

     rgl.points(x, y = NULL, z = NULL, ... )
     rgl.lines(x, y = NULL, z = NULL, ... )
     rgl.linestrips(x, y = NULL, z = NULL, ...)
     rgl.triangles(x, y = NULL, z = NULL, normals=NULL, texcoords=NULL, ... )
     rgl.quads(x, y = NULL, z = NULL, normals=NULL, texcoords=NULL, ... )

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

 x, y, z: coordinates.  Any reasonable way of defining the coordinates
          is acceptable.  See the function 'xyz.coords' for details.

 normals: Normals at each point.

texcoords: Texture coordinates at each point.

    ... : Material properties. See 'rgl.material' for details.

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

     Adds a shape node to the scene. The appearance is defined by the
     material properties. See 'rgl.material' for details.

     For triangles and quads, the normals at each vertex may be
     specified using 'normals'.  These may be given in any way that
     would be acceptable as a single argument to 'xyz.coords'.   These
     need not match the actual normals to the polygon: curved surfaces
     can be simulated by using other choices of normals.

     Texture coordinates may also be specified.  These may be given in
     any way that would be acceptable as a single argument to 
     'xy.coords', and are interpreted in terms of the bitmap specified
     as the material texture, with '(0,0)'  at the lower left, '(1,1)'
     at the upper right.  The texture is used to modulate the colour of
     the polygon.

     These are the lower level functions called by 'points3d',
     'lines3d', etc.  The two principal differences between the 'rgl.*'
     functions and the '*3d' functions are that the former set all
     unspecified material properties to defaults, whereas the latter
     use current values as defaults; the former make persistent changes
     to material properties with each call, whereas the latter make
     temporary changes only for the duration of the call.

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

     Each primitive function returns the integer object ID of the shape
     that was added to the scene.  These can be passed to 'rgl.pop' to
     remove the object from the scene.

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

     'rgl.material', 'rgl.spheres', 'rgl.texts', 'rgl.surface',
     'rgl.sprites'

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

     rgl.open()
     rgl.points(rnorm(1000), rnorm(1000), rnorm(1000), color=heat.colors(1000), size=2)

