function geompack_test09 ( )

%% TEST09 tests VORONOI_POLYGON_AREA_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;

  area_correct = 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, 'TEST09\n' );
  fprintf ( 1, '  VORONOI_POLYGON_AREA_2D computes the area of\n' );
  fprintf ( 1, '  a finite Voronoi polygon.\n' );

  area = voronoi_polygon_area_2d ( center, neighbor_num, neighbor_index, ...
    node_num, p );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The computed area is %f\n', area );
  fprintf ( 1, '  The correct area is  %f\n', area_correct );

  return
end
