function r = cvt_sample ( dim_num, n, n_now, sample, initialize )

%*****************************************************************************80
%
%% cvt_sample() returns sample points.
% 
%  Discussion:
%
%    N sample points are to be taken from the unit box of dimension DIM_NUM.
%
%    These sample points are usually created by a pseudorandom process
%    for which the points are essentially indexed by a quantity called
%    SEED.  To get N sample points, we generate values with indices
%    SEED through SEED + N - 1.
%
%    It may not be practical to generate all the sample points in a 
%    single call.  For that reason, the routine allows the user to
%    request a total of N points, but to require that only N_NOW be
%    generated now (on this call).  
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer DIM_NUM, the spatial dimension.
%
%    integer N, the number of sample points to be generated.
%
%    integer N_NOW, the number of sample points to be generated
%    on this call.  N_NOW must be at least 1.
%
%    integer SAMPLE, ignored.
%
%    logical INITIALIZE, is TRUE if the pseudorandom process should be
%    reinitialized.
%
%  Output:
%
%    real R(DIM_NUM,N_NOW), the initial value for the generators.
%
  if ( n_now < 1 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'CVT_SAMPLE - Fatal error!\n' );
    fprintf ( 1, '  N_NOW < 1.\n' );
    error ( 'CVT_SAMPLE - Fatal error!' );
  end

  r = rand ( dim_num, n_now );

  return
end
