function trinity_word_to_edge_xy_test ( )

%*****************************************************************************80
%
%% trinity_word_to_edge_xy_test() tests word_to_edge_xy().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 March 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'trinity_word_to_edge_xy_test():\n' );
  fprintf ( 1, '  word_to_edge_xy() takes the boundary word of an object\n' );
  fprintf ( 1, '  and computes the (x,y) coordinates of the edge nodes.\n' );

  k = 1;
  [ w, p_ij ] = trinity_tile_word ( k );
  p_xy(1) = p_ij(1) * 0.25;
  p_xy(2) = p_ij(2) * sqrt ( 3.0 ) / 12.0;
  word_print ( w, p_xy, '  Boundary word for trinity tile 1:' );
  e_xy = word_to_edge_xy ( w, p_xy );
  label = 'trinity tile1 edge xy';
  filename = 'trinity_tile1_edge_xy.png';
  edge_plot ( e_xy, label, filename );

  [ w, p_ij ] = trinity_grid_word ( );
  p_xy(1) = p_ij(1) * 0.25;
  p_xy(2) = p_ij(2) * sqrt ( 3.0 ) / 12.0;
  e_xy = word_to_edge_xy ( w, p_xy );
  label = 'trinity edge xy';
  filename = 'trinity_edge_xy.png';
  edge_plot ( e_xy, label, filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'trinity_word_to_edge_xy_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

