function cvtp_test02 ( )

%*****************************************************************************80
%
%% TEST02 tests CVTP with MODULAR false.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    01 August 2016
%
%  Author:
%
%    John Burkardt
%
  m = 2;
  n = 400;
  a = zeros ( m, 1 );
  b = ones ( m, 1 );
  modular = false;
  cvt_steps = 50;
  filename = 'cvt_1x1.txt';
  sample_num_cvt = 100000;
  sample_num_steps = 50;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'CVTP_TEST02\n' );
  fprintf ( 1, '  CVTP can compute a periodic Centroidal Voronoi Tessellation\n' );
  fprintf ( 1, '  but here we turn modularity OFF.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Spatial dimension M =        %d\n', m );
  fprintf ( 1, '  Number of generators =       %d\n', n );
  fprintf ( 1, '  MODULAR arithmetic option =  %s\n', l4_to_s ( modular ) );
  fprintf ( 1, '  Number of sample points =    %d\n', sample_num_cvt );
  fprintf ( 1, '  Number of iterations =       %d\n', sample_num_steps );
%
%  Initialize the generators.
%
  generator = cvtp_region_sampler ( m, n, a, b );
%
%  Carry out the iteration.
%
  for i = 1 : sample_num_steps

    [ generator, change_l2 ] = cvtp_iteration ( m, n, a, b, generator, ...
      modular, sample_num_cvt );

  end
%
%  Save the last result in a file.
%
  save ( filename, 'generator', '-ASCII' );

  return
end
 
