function [ x, w ] = rule06 ( n )

%*****************************************************************************80
%
%% rule06() returns the rule of degree 6.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 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.
%
%  Input:
%
%    integer N, the number of nodes.
%
%  Output:
%
%    real X(3,N), the coordinates of the nodes.
%
%    real W(N), the weights.
%
  xs = [ ...
    0.4919941951523113E-02,0.3415058060219544E-01, ...
    -0.4561198328617235,0.2144499229769493, ...
    -0.1540693059995943,0.3064525403222947, ...
    -0.1305882959514773E-01,0.1535244689838072E-01, ...
    -0.1567784487775340,-0.3973616940506757, ...
    0.9764884616649552E-02,-0.5228087984647453, ...
    0.5565605702210328,0.8423081979023464E-01, ...
    0.2174166091160236,0.3212158945225647, ...
    -0.2593648078545398,0.5636454767202584, ...
    -0.6410949644625729,-0.3344151090582155, ...
    -0.1894588386892019E-01,-0.8214655896199351, ...
    0.8597415475615655 ];
  ys = [ ...
    -0.1392238503430922E-01,0.2542073830543402, ...
    -0.3110385447445375,-0.1234903873249722, ...
    -0.6865214472302168E-01,0.1818495501923178, ...
    -0.2488891169073396E-01,-0.3261143100532925, ...
    0.2522454301000923,-0.1977159083378496, ...
    0.6504184291133676,-0.6635055304123420E-01, ...
    -0.3186690054220115,0.2138059822864521E-01, ...
    0.4599507004997997,-0.4260052421545051, ...
    0.3851980211137577,-0.1111606227821696, ...
    -0.1934318338507612,-0.4491758699723651, ...
    0.9010599459930961,-0.5109860359355179, ...
    -0.5208085141225744 ];
  zs = [ ...
    0.1066228263967720E+01,0.6315886967039234, ...
    0.2300267655106985,0.5632351636302827, ...
    0.6206264896282621,0.1254685876442911, ...
    -0.3357705926282663,0.1147788985927003, ...
    0.2140597800705522,-0.7963361802882329E-01, ...
    0.5868446281578688E-02,0.1934272688455952E-02, ...
    0.1379740251424839E-01,0.3195756126912550E-01, ...
    -0.3027232303753162,-0.2994855602604263, ...
    -0.2825197099253122,-0.3068140495300409, ...
    -0.3660473605161587,-0.3102423292746128, ...
    -0.3473952050436902,-0.2635645240101362, ...
    -0.3603432585369335 ];
  ws = [ ...
    0.6889900028407776E-02,0.3059511845881479E-01, ...
    0.2352818079375775E-01,0.4747145913756433E-01, ...
    0.5149448476741100E-01,0.4198464552012798E-01, ...
    0.6518777271610311E-01,0.5808554412413398E-01, ...
    0.6079762507769643E-01,0.6246727661754427E-01, ...
    0.4232555916776466E-01,0.2191089157324707E-01, ...
    0.4526058614388953E-01,0.1093321687620292, ...
    0.5237000773398501E-01,0.4832452079715138E-01, ...
    0.6123639953387314E-01,0.4577996169297793E-01, ...
    0.2476427914920903E-01,0.3856173525882120E-01, ...
    0.1546337820963114E-01,0.1012088745519476E-01, ...
    0.7031160695311595E-02 ];

  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
