function triangle_orthocenter_test ( )

%*****************************************************************************80
%
%% triangle_orthocenter_test() tests triangle_orthocenter().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 July 2023
%
%  Author:
%
%    John Burkardt
%
  ntest = 4;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_orthocenter_test():\n' );
  fprintf ( 1, '  triangle_orthocenter() computes the orthocenter of a triangle.\n' );

  for i = 1 : ntest

    if ( i == 1 )
      t = [ ...
         0.0,  0.0; ...
         1.0,  0.0; ...
         0.0,  1.0 ];
    elseif ( i == 2 )
      t = [ ...
         0.0,  0.0; ...
         1.0,  0.0; ...
         0.5,  0.86602539 ];
    elseif ( i == 3 )
      t = [ ...
         0.0,  0.0; ...
         1.0,  0.0; ...
         0.5, 10.0 ];
    elseif ( i == 4 )
      t = [ ...
         0.0,  0.0; ...
         1.0,  0.0; ...
        10.0,  2.0 ];
    end

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

    [ center, flag ] = triangle_orthocenter ( t );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  Orthocenter:  (%f,%f)\n', center );

  end

  return
end
