function z = t_tile_complex ( tile_index )

%*****************************************************************************80
%
%% t_tile_complex() returns the complex number vertices for a T-puzzle tile.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 February 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer TILE_INDEX, a tile index.
%    1: the long tile
%    2: the strange tile
%    3: the triangle
%    4: the trapezoid
%
%  Output:
%
%    character W(WN), the boundary word.
%
  s = sqrt ( 2.0 );
%
%
%  The long tile
%
  if ( grid_index == 1 )
    z = [ 0, 1, 1+2*i, 3*i, 0 ];
%
%  The strange tile
%
  elseif ( grid_index == 2 )
    z = [ 0, s/2+s/2*i, 1+(s-1)*i, 1+(2*s-1)*i, 2*s*i, 0 ];
%
%  The triangle
%
  elseif ( grid_index == 3 )
    z = [ 0, 1, i, 0 ];
%
%  The trapezoid.
%
  elseif ( grid_index == 4 )
    z = [ 0, 1, 1+(2-s)*i, (3-s)*i, 0 ];
  else
    fprintf ( 1, '\n' );
    fprintf ( 1, 't_tile_complex(): Fatal error!\n' );
    fprintf ( 1, '  Illegal grid index %d\n', grid_index );
    error ( 't_tile_complex(): Fatal error!\n' );
  end

  return
end

