function triangle_translate_test ( )

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

  t0 = triangle_gort ( );

  d = [ -6, -3 ];
  t1 = triangle_translate ( t0, d );
%
%  Get the plot range.
%
  [ imin0, imax0, jmin0, jmax0 ] = triangle_range ( t0 );
  [ imin1, imax1, jmin1, jmax1 ] = triangle_range ( t1 );

  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;
  triangle_plot ( t0, color, number );

  color = 'red';
  number = false;
  triangle_plot ( t1, color, number );

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

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

  return
end

