function [ w2, p2_ij ] = t_reflect_word ( w, p_ij )

%*****************************************************************************80
%
%% t_reflect_word() returns the boundary word for a reflected object.
%
%  Discussion:
%
%    This function returns the boundary word for an object reflected
%    across the 90 degree line through the base point.
%
%      D--C--B
%   ^  |\ | /|
%   |  | \|/ |
%   J  E--P--A
%      | /|\ |
%      |/ | \|
%      F--G--H
%
%         I-->
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 January 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    character vector W: the boundary word of an object.
%
%    integer P_IJ(1,2): the (i,j) coordinates of the base point.
%
%  Output:
%
%    character vector W2: the boundary word of the reflected object.
%
%    integer P2_IJ(1,2): the (i,j) coordinates of the base point
%    of the reflected object.
%
  c_old = 'ABCDEFGH';
  c_new = 'AHGFEDCB';
 
  w2 = s_substitute ( w, c_old, c_new );
% w2 = w2(end:-1:1);

  p2_ij(1,1:2) = p_ij(1,1:2);

  return
end

