function cvt_corn_movie_test ( )

%*****************************************************************************80
%
%% cvt_corn_movie_test() tests cvt_corn_movie().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Local:
%
%    integer IT_MAX: the number of iterations.
%
%    integer NB, the number of boundary points.
%
%    integer NI, the number of interior points.
%
%    integer NP, the total number of points.
%
%    integer NS, the number of sample points.
%
%    real PR_BUD, the probability that a boundary point will bud.
%
%    real PR_BUD_ANGULAR, the probability that a boundary point bud
%    will be constrained to the boundary.
%
%    real R: the radius of the circle that represents the corn kernel.
%
  addpath ( '../cvt_corn_movie' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'cvt_corn_movie_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  cvt_corn_movie() makes a movie\n' );
  fprintf ( 1, '  in which the growth of a corn kernel is simulated\n' );
  fprintf ( 1, '  using Centroidal Voronoi Tessellation (CVT) techniques.\n' );
%
%  Set parameters.
%
  it_max = 50;
  nb = 30;
  ni = 60;
  np = ni + nb;
  ns = 10000;

  pr_bud = 0.05;
  pr_bud_angular = 0.30;

  r = 1.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Parameter values:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  %12d = NB, number of points on boundary\n', nb );
  fprintf ( 1, '  %12d = NI, number of point in interior\n', ni );
  fprintf ( 1, '  %12d = NP, total number of points\n', np );
  fprintf ( 1, '  %12d = NS, number of sample points for Lloyd''s algorithm\n', ns );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  %12f = PR_BUD, probability a boundary point creates a bud.\n', pr_bud );
  fprintf ( 1, '  %12f = PR_BUD_ANGULAR, probability a boundary bud is constrained to the boundary.\n', pr_bud_angular );
  fprintf ( 1, '  %12f = R, initial radius of circular corn kernel:\n', r );
%
%  Call the simulator.
%
  cvt_corn_movie ( it_max, nb, ni, np, ns, pr_bud, pr_bud_angular, r );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'cvt_corn_movie_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../cvt_corn_movie' );

  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 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

