function vertex_translate_test ( )

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

  v0 = vertex_gort ( );

  d = [ -3, -6 ];
  v1 = vertex_translate ( v0, d );
%
%  Get the plot range.
%
  [ imin0, imax0, jmin0, jmax0 ] = vertex_range ( v0 );
  [ imin1, imax1, jmin1, jmax1 ] = vertex_range ( v1 );

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

  color = 'red';
  number = false;
  vertex_plot ( v1, color, number );

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

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

  return
end

