function vertex_reflect_test ( )

%*****************************************************************************80
%
%% vertex_reflect_test tests vertex_reflect().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 November 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'vertex_reflect_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  vertex_reflect() reflects a polyiamond\n' );
  fprintf ( 1, '  described by its vertex list.\n' );

  v0 = vertex_hexiamond ( 10 );
  r = 1;
  v1 = vertex_reflect ( v0, r );
  r = 2;
  v2 = vertex_reflect ( v0, r );
  r = 3;
  v3 = vertex_reflect ( v0, r );
%
%  Get the plot range.
%
  [ imin0, imax0, jmin0, jmax0 ] = edge_range ( v0 );
  [ imin1, imax1, jmin1, jmax1 ] = edge_range ( v1 );
  [ imin2, imax2, jmin2, jmax2 ] = edge_range ( v2 );
  [ imin3, imax3, jmin3, jmax3 ] = edge_range ( v3 );

  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;
  vertex_plot ( v0, color, number );

  color = 'magenta';
  number = true;
  vertex_plot ( v1, color, number );

  color = 'yellow';
  number = true;
  vertex_plot ( v2, color, number );

  color = 'blue';
  number = true;
  vertex_plot ( v3, color, number );

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

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

  return
end
