function polygon_point_dist_test ( )

%*****************************************************************************80
%
%% POLYGON_POINT_DIST_TEST tests POLYGON_POINT_DIST.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    15 October 2015
%
%  Author:
%
%    John Burkardt
%
  n = 3;
 
  p_test = [ ...
    4.0,  5.0; ...
    2.0,  3.0; ...
   -2.0, -1.0 ]';
  v = [ ...
    1.0, 1.0; ...
    4.0, 3.0; ...
    2.0, 5.0 ]';
 
  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYGON_POINT_DIST_TEST\n' );
  fprintf ( 1, '  POLYGON_POINT_DIST computes polygon-point distance.\n' );

  r8mat_transpose_print ( 2, n, v, '  Vertices of polygon:' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '       X             Y             DIST\n' );
  fprintf ( 1, '\n' );

  for test = 1 : 3

    p(1:2,1) = p_test(1:2,test);
    dist = polygon_point_dist ( n, v, p );
    fprintf ( 1, '  %14.6g  %14.6g  %14.6g\n', p(1:2), dist );

  end

  return
end
