function uniform_in_hypercube_test ( )

%*****************************************************************************80
%
%% uniform_in_hypercube_test() tests uniform_in_hypercube().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 April 2022
%
%  Author:
%
%    John Burkardt
%
  n = 1000;
  d = 3

  fprintf ( 1, '\n' );
  fprintf ( 1, 'uniform_in_hypercube_test():\n' );
  fprintf ( 1, '  uniform_in_hypercube() generates uniform \n' );
  fprintf ( 1, '  points in the unit hypercube.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of points N =    %12d\n', n );
  fprintf ( 1, '  Spatial dimension D =   %12d\n', d );

  p = uniform_in_hypercube ( n, d );
%
%  Make a plot.
%
  clf ( );
  scatter3 ( p(:,1), p(:,2), p(:,3), 'b', 'filled' );
  grid ( 'on' );
  axis ( 'equal' );
  xlabel ( '<--- X --->' );
  ylabel ( '<--- Y --->' );
  zlabel ( '<--- Z --->' );
  title ( 'uniform\_in\_hypercube()' );
  filename = 'uniform_in_hypercube.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s".\n', filename );

  return
end
