function geometry_test065 ( )

%*****************************************************************************80
%
%% TEST065 tests POINTS_CENTROID_2D.
%
%  !....3&11....
%  !............
%  !............
%  X..9.........
%  !.....5......
%  !...........6
%  !.4.2...10...
%  !.....8...12.
%  V............
%  !..7.........
%  !......1.....
%  !............
%  !............
%  !----V----X--
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    07 April 2009
%
%  Author:
%
%    John Burkardt
%

  maxtri = 20;
  n = 12;
  dim_num = 2;

  p = [ ...
     7.0,  3.0; ...
     4.0,  7.0; ...
     5.0, 13.0; ...
     2.0,  7.0; ...
     6.0,  9.0; ...
    12.0,  8.0; ...
     3.0,  4.0; ...
     6.0,  6.0; ...
     3.0, 10.0; ...
     8.0,  7.0; ...
     5.0, 13.0; ...
    10.0,  6.0 ]';

  fprintf ( 1, '\n' );
  fprintf ( 1, 'TEST065\n' );
  fprintf ( 1, '  POINTS_CENTROID_2D computes the centroid of a\n' );
  fprintf ( 1, '    discrete set of points.\n' );

  r8mat_transpose_print ( dim_num, n, p, '  The points:' );

  centroid_index = points_centroid_2d ( n, p );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The centroid is point #:%d\n', centroid_index );

  return
end
