function boundary_translate_test ( )

%*****************************************************************************80
%
%% boundary_translate_test() tests boundary_translate().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 November 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boundary_translate_test():\n' );
  fprintf ( 1, '  boundary_translate() translates a polyiamond\n' );
  fprintf ( 1, '  described by its boundary word.\n' );

  [ w0, p0 ] = boundary_gort ( );

  d = [ -2, + 6 ];
  [ w1, p1 ] = boundary_translate ( w0, p0, d );
%
%  Get the plot range.
%
  [ imin0, imax0, jmin0, jmax0 ] = boundary_range ( w0, p0 );
  [ imin1, imax1, jmin1, jmax1 ] = boundary_range ( w1, p1 );

  imin = min ( [ 0, imin0, imin1 ] );
  imax = max ( [ 0, imax0, imax1 ] ) + 1;
  jmin = min ( [ 0, jmin0, jmin1 ] );
  jmax = max ( [ 0, jmax0, jmax1 ] ) + 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 polyiamond.
%
  color = 'cyan';
  number = false;
  boundary_plot ( w0, p0, color, number );

  color = 'red';
  number = false;
  boundary_plot ( w1, p1, color, number );

  axis ( 'equal' );
  axis ( 'off' );
  title ( 'Boundary translate test' )
  hold ( 'off' );

  filename = 'boundary_translate_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

