function edge_reflect_test ( )

%*****************************************************************************80
%
%% edge_reflect_test tests edge_reflect().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 November 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'edge_reflect_test\n' );
  fprintf ( 1, '  edge_reflect() reflects a polyiamond\n' );
  fprintf ( 1, '  described by its edge list.\n' );

  e0 = edge_hexiamond ( 11 );
  r = 1;
  e1 = edge_reflect ( e0, r );
  r = 2;
  e2 = edge_reflect ( e0, r );
  r = 3;
  e3 = edge_reflect ( e0, r );
%
%  Get the plot range.
%
  [ imin0, imax0, jmin0, jmax0 ] = edge_range ( e0 );
  [ imin1, imax1, jmin1, jmax1 ] = edge_range ( e1 );
  [ imin2, imax2, jmin2, jmax2 ] = edge_range ( e2 );
  [ imin3, imax3, jmin3, jmax3 ] = edge_range ( e3 );

  imin = min ( [ 0, imin0, imin1, imin2, imin3 ] );
  imax = max ( [ 0, imax0, imax1, imax2, imax3 ] ) + 1;
  jmin = min ( [ 0, jmin0, jmin1, jmin2, jmin3 ] );
  jmax = max ( [ 0, jmax0, jmax1, jmax2, jmax3 ] ) + 1;
%
%  Draw the parallelogram grid.
%
  clf ( );
  hold ( 'on' );
  r = 0.85;
  color_back = 'cyan';
  color_tri =  'white';
  number = false;
  grid_plot ( imin, imax, jmin, jmax, r, color_back, color_tri, number );
%
%  Draw the polyiamonds.
%
  color = 'cyan';
  number = true;
  edge_plot ( e0, color, number );

  color = 'magenta';
  number = true;
  edge_plot ( e1, color, number );

  color = 'yellow';
  number = true;
  edge_plot ( e2, color, number );

  color = 'blue';
  number = true;
  edge_plot ( e3, color, number );

  axis ( 'equal' );
  axis ( 'off' );
  title ( 'edge reflect test' )
  hold ( 'off' );

  filename = 'edge_reflect_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'edge_reflect_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

