function triangle_sample_reflect_test ( )

%*****************************************************************************80
%
%% triangle_sample_reflect_test() tests triangle_sample_reflect().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 January 2025
%
%  Author:
%
%    John Burkardt
%
  t = [ ...
     4.0, 2.0; ...
     1.0, 5.0; ...
    -2.0, 2.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_sample_reflect_test():\n' );
  fprintf ( 1, '  triangle_sample_reflect() samples a triangle.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Triangle vertices:\n' );
  disp ( t );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Sample points (X,Y) and (XSI1,XSI2,XSI3) coordinates:\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 10

    n = 1;
    p = triangle_sample_reflect ( t, n );

    xsi = triangle_xy_to_xsi ( t, p );

    fprintf ( 1, '  %10f  %10f    %10f  %10f  %10f\n', p, xsi );

  end

  return
end
