function joukowsky_transform_test ( )

%*****************************************************************************80
%
%% joukowsky_transform_test() tests joukowsky_transform().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    22 January 2023
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../joukowsky_transform' );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'joukowsky_transform_test(): \n' );
  fprintf ( 1, '  MATLAB/Octave version %s ', version ( ) );
  fprintf ( 1, '  Test joukowsky_transform().\n' );

  joukowsky_transform_test01 ( );
  joukowsky_transform_test02 ( );
  joukowsky_transform_test03 ( );
  joukowsky_transform_test04 ( );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'joukowsky_transform_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  rmpath ( '../joukowsky_transform' );

  return
end
function joukowsky_transform_test01 ( )

%*****************************************************************************80
%
%% joukowsky_transform_test01().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    22 January 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'joukowsky_transform_test01():\n' );

  n = 101;

  c1 = -0.156;
  r1 = 1.2;
  z1 = circle_points ( c1, r1, n );
  fz1 = joukowsky_transform ( z1 );

  c2 = -0.100;
  r2 = 1.1;
  z2 = circle_points ( c2, r2, n );
  fz2 = joukowsky_transform ( z2 );

  clf ( );
  hold ( 'on' );
    plot ( real ( fz1 ), imag ( fz1 ), 'b.' );
    plot ( real ( fz2 ), imag ( fz2 ), 'r.' );
  hold ( 'off' );
  axis ( 'equal' );
  grid ( 'on' );
  filename = 'airfoil1.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  
  return
end
function joukowsky_transform_test02 ( )

%*****************************************************************************80
%
%% joukowsky_transform_test02().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    21 January 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'joukowsky_transform_test02():\n' );

  n = 101;

  c1 = complex ( -0.133, 0.238 );
  r1 = 1.2;
  z1 = circle_points ( c1, r1, n );
  fz1 = joukowsky_transform ( z1 );

  c2 =  complex ( 0.022, 0.219 );
  r2 = 1.1;
  z2 = circle_points ( c2, r2, n );
  fz2 = joukowsky_transform ( z2 );

  clf ( );
  hold ( 'on' );
    plot ( real ( fz1 ), imag ( fz1 ), 'b.' );
    plot ( real ( fz2 ), imag ( fz2 ), 'r.' );
  hold ( 'off' );
  axis ( 'equal' );
  grid ( 'on' );
  filename = 'airfoil2.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  
  return
end
function joukowsky_transform_test03 ( )

%*****************************************************************************80
%
%% joukowsky_transform_test03().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    22 January 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'joukowsky_transform_test03():\n' );

  n = 101;
  c = complex ( -0.5, 0.05 );
  r = 1.2;
  z = circle_points ( c, r, n );
  fz = joukowsky_transform ( z );

  clf ( );
  plot ( real ( fz ), imag ( fz ), 'b.' );
  axis ( 'equal' );
  grid ( 'on' );
  filename = 'airfoil3.png'
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  
  return
end
function joukowsky_transform_test04 ( )

%*****************************************************************************80
%
%% joukowsky_transform_test04().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    22 January 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'joukowsky_transform_test04():\n' );

  n = 101;
  c = complex ( -0.02, 0.3 );
  r = 1.2;
  z = circle_points ( c, r, n );
  fz = joukowsky_transform ( z );

  clf ( );
  plot ( real ( fz ), imag ( fz ), 'b.' );
  axis ( 'equal' );
  grid ( 'on' );
  filename = 'airfoil4.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  
  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 November 2022
%
%  Author:
%
%    John Burkardt
%
  t = now ( );
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

