function triangle_reference_sample_test ( )

%*****************************************************************************80
%
%% triangle_reference_sample_test() tests triangle_reference_sample().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 July 2023
%
%  Author:
%
%    John Burkardt
%
  t = [ ...
     0.0, 0.0; ...
     1.0, 0.0; ...
     0.0, 1.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_reference_sample_test():\n' );
  fprintf ( 1, '  triangle_reference_sample() samples the reference 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_reference_sample ( n );

    xsi = triangle_xy_to_xsi ( t, p );

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

  end

  return
end
