function interp_spline_test ( xd, yd )

%*****************************************************************************80
%
%% interp_spline_test() interpolates the profile data using splines.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 January 2025
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Cleve Moler,
%    Numerical Computing with MATLAB,
%    SIAM, 2004,
%    ISBN13: 978-0-898716-60-3,
%    LC: QA297.M625. 
%
%  Input:
%
%    real xd(nd), yd(nd): data to be interpolated.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'interp_spline_test():\n' );
  fprintf ( 1, '  Compute and display a cubic spline interpolant to\n' );
  fprintf ( 1, '  sample data from a facial profile.\n' );
%
%  Extract xd and yd data vectors.
%
  md = length ( xd );
  fprintf ( 1, '  The data consists of %d (x,y) pairs.\n', md );
%
%  Evaluate the spline through the data.
%
  ni = 101;
  [ xi, yi ] = interp_spline ( xd, yd, ni );

  filename = 'interp_spline_test.png';
  interp_plot ( xd, yd, xi, yi, filename );

  return
end
