pointsTetrahedra           package:misc3d           R Documentation

_C_r_e_a_t_e _a _S_e_t _o_f _T_e_t_r_a_h_e_t_r_a _C_e_n_t_e_r_e_d _a_t _D_a_t_a _P_o_i_n_t_s

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

     Creates a scene consisting of small tetrahedra centered at
     specified data points in three dimensions.

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

     pointsTetrahedra(x, y, z, size = 0.01, color = "black", ...)

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

 x, y, z: numeric vectors representing point coordinates.

    size: numeric; multiple of data range to use for the size of the
          tetrahedron in each dimension; recycled to length 3.

   color: color to use for the tetrahedra.

     ...: additional arguments to be passed on to 'makeTriangles'.

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

     This function is useful, for example, for incorporating raw data
     along with a density estimate surface in a scene rendered using
     standard or grid graphics.  For 'rgl' rendering 'points3d' is an
     alternative.

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

     Returns a triangle mesh scene representing the tetrahedra.

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

     'points3d'.

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

       with(quakes, {
           d <- kde3d(long, lat, -depth, n = 40)
           v <- contour3d(d$d, exp(-12),d$x/22, d$y/28, d$z/640,
                          color="green", color2="gray", draw=FALSE)
           p <- pointsTetrahedra(long/22, lat/28, -depth/640,
                                 size = 0.005)
           drawScene(list(v, p))
       })

