function [ x, w ] = rule05 ( n )

%*****************************************************************************80
%
%% RULE05 returns the rule of degree 5.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    08 July 2014
%
%  Author:
%
%    Original FORTRAN77 version by Hong Xiao, Zydrunas Gimbutas.
%    This MATLAB version by John Burkardt.
%
%  Reference:
%
%    Hong Xiao, Zydrunas Gimbutas,
%    A numerical algorithm for the construction of efficient quadrature
%    rules in two and higher dimensions,
%    Computers and Mathematics with Applications,
%    Volume 59, 2010, pages 663-676.
%
%  Parameters:
%
%    Input, integer N, the number of nodes.
%
%    Output, real X(3,N), the coordinates of the nodes.
%
%    Output, real W(N), the weights.
%
  xs = [ ...
    -0.2648598061927048E-17, 0.8182612016952856E+00, ...
    -0.8182612016952856E+00, 0.3320846059655003E+00, ...
    -0.3320846059655003E+00, -0.7192063268453662E+00, ...
    0.7192063268453662E+00, 0.8748312857031093E+00, ...
    -0.8748312857031093E+00, 0.6703438980154780E+00, ...
    -0.6703438980154780E+00, -0.1288932781094893E-01, ...
    0.1288932781094893E-01 ];
  ys = [ ...
    0.2334819700920049E-17, 0.6996915596126003E+00, ...
    -0.6996915596126003E+00, 0.8164106580812136E+00, ...
    -0.8164106580812136E+00, 0.3823687870227997E+00, ...
    -0.3823687870227997E+00, -0.4498159475180819E-01, ...
    0.4498159475180820E-01, -0.8936284816367571E+00, ...
    0.8936284816367571E+00, -0.6644842917167314E+00, ...
    0.6644842917167314E+00 ];
  zs = [ ...
    -0.2514317405785843E-17, -0.3279435833702815E+00, ...
    0.3279435833702815E+00, 0.6999000775245028E+00, ...
    -0.6999000775245028E+00, 0.7766614685968243E+00, ...
    -0.7766614685968243E+00, 0.7066212170288233E+00, ...
    -0.7066212170288233E+00, 0.1368716985635272E+00, ...
    -0.1368716985635272E+00, 0.9082737241365967E+00, ...
    -0.9082737241365967E+00 ];
  ws = [ ...
    0.5954583420518295E+00, 0.1966394408155049E+00, ...
    0.1966394408155048E+00, 0.1972244637798873E+00, ...
    0.1972244637798874E+00, 0.2056648105428643E+00, ...
    0.2056648105428642E+00, 0.1744527123656727E+00, ...
    0.1744527123656728E+00, 0.1737372846337885E+00, ...
    0.1737372846337885E+00, 0.1687656792094623E+00, ...
    0.1687656792094623E+00 ];

  x(1,1:n) = xs(1:n);
  x(2,1:n) = ys(1:n);
  x(3,1:n) = zs(1:n);
  w(1:n) = ws(1:n);

  return
end
