function maple_area_estimate_grid_test ( b, p_m, p_n )

%*****************************************************************************80
%
%% maple_area_estimate_grid_test() tests maple_area_estimate_grid().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 August 2016
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer B(*,2), a list of pixels that form the boundary.
%
%    integer P_M, P_N, the number of rows and columns of pixels.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'maple_area_estimate_grid_test():\n' );
  fprintf ( 1, '  maple_area_estimate_grid() is given a polygon defining the\n' );
  fprintf ( 1, '  boundary of the maple leaf, using a regular NxN grid of\n' );
  fprintf ( 1, '  points to estimate the relative area.\n' );
  fprintf ( 1, '  Hayes got a relative area of 0.4185 using a 1024x1024 grid.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   I     N       N^2  Estimated relative area\n' );
  fprintf ( 1, '\n' );

  n = 1;
  for log2n = 0 : 10
    estimate = maple_area_estimate_grid ( b, p_m, p_n, n );
    fprintf ( 1, '  %2d  %4d  %8d  %14.6f\n', log2n, n, n * n, estimate );
    n = 2 * n;
  end

  return
end

