function geompack_test10 ( )

%% TEST10 tests VORONOI_POLYGON_CENTROID_2D.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  ndim = 2;
  neighbor_num = 4;
  node_num = 5;

  centroid_correct = [ 0.5, 0.5]';
  center = 5;
  neighbor_index = [ 1, 2, 3, 4 ];
  p = [ 
    0.0, 0.0; 
    1.0, 0.0;
    1.0, 1.0;
    0.0, 1.0;
    0.5, 0.5 ]';

  fprintf ( 1, '\n' );;
  fprintf ( 1, 'TEST10\n' );
  fprintf ( 1, '  VORONOI_POLYGON_CENTROID_2D computes the centroid of\n' );
  fprintf ( 1, '  a finite Voronoi polygon.\n' );

  centroid = voronoi_polygon_centroid_2d ( center, neighbor_num, neighbor_index, ...
    node_num, p );

  r8vec_print ( ndim, centroid, '  The computed centroid:' );
  r8vec_print ( ndim, centroid_correct, '  The correct centroid:' );

  return
end
