cells                package:tripack                R Documentation

_e_x_t_r_a_c_t _i_n_f_o _a_b_o_u_t _v_o_r_o_n_o_i _c_e_l_l_s

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

     This function returns some info about the cells of a voronoi
     mosaic, including the coordinates of the vertices and the cell
     area.

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

     cells(voronoi.obj)

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

voronoi.obj: object of class 'voronoi'  

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

     The function calculates the neighbourhood relations between the
     underlying triangulation and translates it into the neighbourhood
     relations between the voronoi cells.

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

     retruns a list of lists, one entry for each voronoi cell which
     contains 

   cell : cell index

 center : cell 'center'

neighbours : neighbour cell indices

   nodes: 2 times 'nnb' matrix with vertice coordinates

    area: cell area

_N_o_t_e:

     outer cells have 'area=NA', currently also 'nodes=NA' which is not
     really useful - to be done later

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

     A. Gebhardt

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

     'voronoi.mosaic',  'voronoi.area'

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

     data(tritest)
     tritest.vm <- voronoi.mosaic(tritest$x,tritest$y)
     tritest.cells <- cells(tritest.vm)
     # higlight cell 12:
     plot(tritest.vm)
     polygon(t(tritest.cells[[12]]$nodes),col="green")
     # put cell area into cell center:
     text(tritest.cells[[12]]$center[1],
          tritest.cells[[12]]$center[2],
          tritest.cells[[12]]$area)

