function prime_spiral_test ( )

%*****************************************************************************80
%
%% prime_spiral_test() tests prime_spiral().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 December 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'prime_spiral_test():\n' );
  fprintf ( 1, '  prime_spiral(thick,k) makes a 2*thick+1 order array P\n' );
  fprintf ( 1, '  of 1''s for primes and 0''s otherwise,\n' );
  fprintf ( 1, '  spiralling out from a central value of k.\n' );
%
%  Print a small version of P.
%
  thick = 3;
  k = 1;
  P = prime_spiral ( thick, k );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  thick = %d\n', thick );
  fprintf ( 1, '  k = %d\n', k );
  fprintf ( 1, '  P:\n' );
  disp ( P )
%
%  Creat a larger version, and display it with spy().
%
  thick = 30;
  k = 1;
  P = prime_spiral ( thick, k );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  thick = %d\n', thick );
  fprintf ( 1, '  k = %d\n', k );
  fprintf ( 1, '  P:\n' );

  spy ( P );
  axis ( 'off' );
  filename = 'prime_spiral.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  
  return
end

