function P = box_sample ( n, a, b, c )

%*****************************************************************************80
%
%% box_sample() samples points from a box.
%
%  Discussion:
%
%    The box has sides of length a <= b <= c.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 May 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer n: the number of sample points.
%
%    real a, b, c: the lengths of the sides.
%
%  Output:
%
%    real P(n,3): randomly selected points.
%
  S = [   a, 0.0, 0.0; ...
        0.0,   b, 0.0; ...
        0.0, 0.0,   c ];

  R = rand ( n, 3 );

  P = R * S;

  return
end

