lighting               package:misc3d               R Documentation

_L_i_g_h_t_i_n_g _F_u_n_c_t_i_o_n_s

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

     Functions to compute colors modified for lighting effects.

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

     phongLighting(normals, view, light, color, color2, alpha, material = "default")
     perspLighting(normals, view, light, color, color2, alpha, material = "default")

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

 normals: numeric matrix with three columns representing surface normal
          vectors.

    view: numeric vector of length 3 representing the direction to the
          viewer.

   light: numeric vector of length 3 or 4.  The first three elements
          represent the direction to the light.  The fourth element, if
          present, represents light intensity; the default is 1.

   color: colors to use for faces in the direction of the normal
          vectors.

  color2: opposite face color.

   alpha: alpha channel level, a number between 0 and 1.

material: material specification. Currently possible values are the
          character strings "dull", "shiny", "metal", and "default".

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

     'phongLighting' uses the Phong lighting model to compute colors
     modified for view direction, light direction, and material
     properties. 'perspLighting' implements approximately the same
     lighting model as the 'persp' function.

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

     Vector of color specifications.

