function polygon_contains_point_test ( )

%*****************************************************************************80
%
%% polygon_contains_point_test() tests polygon_contains_point().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    05 May 2020
%
%  Author:
%
%    John Burkardt
%
  n = 5;
  test_num = 4;
 
  px = [ 0.0, 1.0, 2.0, 1.0, 0.0 ];
  py = [ 0.0, 0.0, 1.0, 2.0, 2.0 ];

  qx = [ 1.0, 3.0, 0.1,  0.5 ];
  qy = [ 1.0, 4.0, 1.0, -0.25 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'polygon_contains_point_test()\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  polygon_contains_point() determines if\n' );
  fprintf ( 1, '  a point is in a polygon.\n' );

  r8vec2_print ( px, py, '  The polygon vertices:' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '          P          Inside\n' );
  fprintf ( 1, '\n' );

  for i = 1 : test_num
  
    inside = polygon_contains_point ( px, py, qx(i), qy(i) );

    fprintf ( 1, '  (%8.4f,%8.4f)    %s\n', qx(i), qy(i), mat2str ( inside ) );

  end
 
  return
end
