function pyriform_egg_test ( )

%*****************************************************************************80
%
%% pyriform_egg_test() tests pyriform_egg().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 June 2022
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Valeriy Narushin, Michael Romanov, Darren Griffin,
%    "Egg and math: introducing a universal formula for egg shape",
%    Annals of the New York Academy of Sciences,
%    Number 1505, pages 169-177, 23 August 2021.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pyriform_egg_test():\n' );
  fprintf ( 1, '  pyriform_egg() evaluates a formula\n' );
  fprintf ( 1, '  for pyriform egg shapes.\n' );

  n = 21;
  B = 1.0;
  L = 1.5;
  w = 0.25;
  x = cheby1space ( - L/2.0, +L/2.0, n );
  y = pyriform_egg ( B, L, w, x );

  clf ( );
  hold ( 'on' );
  plot ( x, y, 'r-', 'linewidth', 3 );
  plot ( x, -y, 'g-', 'linewidth', 3 );
  hold ( 'off' );
  axis ( 'equal' );
  grid ( 'on' );
  title ( 'pyriform egg' );
  filename = 'pyriform_egg.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

