function polygon_triangulate_test ( )

%*****************************************************************************80
%
%% polygon_triangulate_test() tests polygon_triangulate().
%
%  Discussion:
%
%    There are N-3 triangles in the triangulation.
%
%    For the first N-2 triangles, the first edge listed is always an
%    internal diagonal.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 October 2015
%
  n = 10;

  x = [ ...
    8.0, 7.0, 6.0, 5.0, 4.0, ...
    3.0, 2.0, 1.0, 0.0, 4.0 ];
  y = [ ...
    0.0, 10.0,  0.0, 10.0,  0.0, ...
   10.0,  0.0, 10.0,  0.0, -2.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'polygon_triangulate_test():\n' );
  fprintf ( 1, '  polygon_triangulate() triangulates a polygon.\n' );
  fprintf ( 1, '  Here, we triangulate the comb_10() polygon.\n' );

  triangles = polygon_triangulate ( n, x, y );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Triangles:\n' );
  fprintf ( 1, '\n' );
  for j = 1 : n - 2
    fprintf ( 1, '  %2d:  %2d  %2d  %2d\n', j, triangles(1:3,j) );
  end

  return
end
