function [ x, w ] = rule07 ( n )

%*****************************************************************************80
%
%% RULE07 returns the rule of degree 7.
%
%  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.9181562358887896E+00, 0.4489608068872516E+00, ...
    -0.3858744893115341E+00, -0.8375581084754601E+00, ...
    0.8759137241702486E+00, 0.3582970649375837E+00, ...
    -0.3606806413292835E-02, 0.8240785780348802E+00, ...
    0.3960539405501686E+00, 0.6764493821739725E+00, ...
    -0.7078657252089905E+00, -0.9910280819070909E+00, ...
    -0.1644247691119722E-01, -0.9181562358887897E+00, ...
    -0.4489608068872515E+00, 0.3858744893115342E+00, ...
    0.8375581084754601E+00, -0.8759137241702486E+00, ...
    -0.3582970649375837E+00, 0.3606806413292889E-02, ...
    -0.8240785780348803E+00, -0.3960539405501686E+00, ...
    -0.6764493821739724E+00, 0.7078657252089905E+00, ...
    0.9910280819070909E+00, 0.1644247691119727E-01 ];
  ys = [ ...
    -0.8730646210868583E+00, 0.3003747003093036E+00, ...
    -0.8537024640925601E+00, -0.5290274183292351E+00, ...
    -0.2186272204366992E+00, -0.8524776744046263E+00, ...
    0.4528069580583293E+00, -0.7958792991210972E+00, ...
    -0.3231996926348866E+00, 0.9204855453579330E+00, ...
    0.1300957145548008E+00, -0.6507820069674347E+00, ...
    0.9452977797065001E+00, 0.8730646210868583E+00, ...
    -0.3003747003093037E+00, 0.8537024640925601E+00, ...
    0.5290274183292349E+00, 0.2186272204366992E+00, ...
    0.8524776744046263E+00, -0.4528069580583293E+00, ...
    0.7958792991210972E+00, 0.3231996926348866E+00, ...
    -0.9204855453579330E+00, -0.1300957145548009E+00, ...
    0.6507820069674347E+00, -0.9452977797065000E+00 ];
  zs = [ ...
    -0.8219732697110896E+00, 0.2702488394739114E+00, ...
    -0.8405117117885644E+00, 0.8255893620180769E+00, ...
    -0.2154761758370911E+00, -0.2372349012690425E+00, ...
    -0.5304006751850494E+00, 0.5660607048365347E+00, ...
    -0.8528418042921908E+00, -0.2586944089083810E+00, ...
    -0.9317986614089844E+00, -0.5844907560422828E+00, ...
    -0.9724859293584232E+00, 0.8219732697110896E+00, ...
    -0.2702488394739114E+00, 0.8405117117885644E+00, ...
    -0.8255893620180769E+00, 0.2154761758370910E+00, ...
    0.2372349012690426E+00, 0.5304006751850494E+00, ...
    -0.5660607048365347E+00, 0.8528418042921908E+00, ...
    0.2586944089083810E+00, 0.9317986614089844E+00, ...
    0.5844907560422828E+00, 0.9724859293584232E+00 ];
  ws = [ ...
    0.2818669485625658E-01, 0.2457778545108605E+00, ...
    0.7322107549897901E-01, 0.7474403008707498E-01, ...
    0.1424052690706277E+00, 0.1464998318560304E+00, ...
    0.2315603483757853E+00, 0.8404353770943794E-01, ...
    0.1402956703321254E+00, 0.8519832938411190E-01, ...
    0.7845038486431180E-01, 0.5021162675106791E-01, ...
    0.3361890907642531E-01, 0.2818669485625655E-01, ...
    0.2457778545108605E+00, 0.7322107549897898E-01, ...
    0.7474403008707500E-01, 0.1424052690706277E+00, ...
    0.1464998318560304E+00, 0.2315603483757854E+00, ...
    0.8404353770943793E-01, 0.1402956703321254E+00, ...
    0.8519832938411191E-01, 0.7845038486431183E-01, ...
    0.5021162675106793E-01, 0.3361890907642534E-01 ];

  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
