function [ x, w ] = rule08 ( n )

%*****************************************************************************80
%
%% RULE08 returns the rule of degree 8.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL 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.
%
%  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 = [ ...
    -.1611772551670525E-01,-.7148827236840712E-02, ...
    0.4589923372088558,-.4520990492494178, ...
    0.1109560356430631,0.1825224293648890, ...
    -.1507489805419971,-.2877324734878600, ...
    0.3680747212378487,0.4788156424890513, ...
    -.3478779367400819,-.3548285868734744E-01, ...
    0.2591650442934043,-.1305037378946309E-02, ...
    -.3493996070828597E-01,-.1660462859707297, ...
    0.1010085522422429,-.3587468163605144, ...
    -.3473067563985682,-.8635741121401184E-01, ...
    0.2901168201778487,0.1042093355150105, ...
    -.6419387451918364E-01,-.2016986972118968, ...
    0.1846170677356399,0.3788893958160157, ...
    -.4818716163165796,0.6821719050778170, ...
    0.3978642293015137,-.6975889470159129, ...
    0.2742964749336314E-02,0.1645687860050991E-01, ...
    -.4618349214785903,0.1575090568397094, ...
    0.5399175203215238,-.1403905262089725, ...
    0.4453396570037857E-01,-.4234360302104348, ...
    -.7214176376894034,0.7278118716190342, ...
    0.4901890779701343,-.8758887352507779, ...
    0.7632377205619759E-02,0.9317431147169187 ];
  ys = [ ...
    0.7998600119500696E-03,0.1723914595007140, ...
    -.1744716351651229,-.2632941629071404, ...
    -.6295720376005641E-01,0.1678382818593359, ...
    -.7826941873249307E-01,-.1234686974783635, ...
    -.2169876766339741,-.4629437300594242E-01, ...
    -.1295630336164733,-.2268108031307481, ...
    0.1330071443027294,0.4919409115894537, ...
    0.3001995169122194,0.1407736457687509, ...
    -.2259257575315161,-.1083199795573463, ...
    -.3742304739030127,-.1478062482085008, ...
    -.3449512373726749,0.2883671141680468E-01, ...
    0.2558125570853043,0.4404368079041183, ...
    0.3998568605285963,-.9956585162815586E-01, ...
    -.1509747383909747E-01,-.3956518618817587, ...
    0.2256616013248351,-.3899651023918449, ...
    0.8134998230879619,-.4451036700294634, ...
    -.4535647479937944,0.6650145460171435, ...
    -.4674624469973033,0.7012653983759632, ...
    -.5107241847309127,0.2263324997687613, ...
    -.2727155170636352,-.2861627803070728, ...
    0.1856306523332632,-.5566374678887420, ...
    0.1056056946669113D+01,-.5664247124705913 ];
  zs = [ ...
    0.1140750120480647D+01,0.7860696072793454, ...
    -.3991430912330994,0.3536092960240441, ...
    0.8189404142301465,0.4764962716361752, ...
    0.7628974295081231,-.3880058323817796, ...
    0.3997553695274408,0.1144656464995089, ...
    0.2509171968778639,0.4174615578343315, ...
    -.2747778345118032,0.3031929324753210, ...
    -.3442503524230918,0.3970537434180833, ...
    -.3070893258601431,-.1989904396903917, ...
    0.1526258958568332E-01,-.1542350189843949E-03, ...
    0.4121026001314489E-01,0.3248913848279931, ...
    -.6957900515388780E-01,-.3340987564879216E-01, ...
    -.1303527431545757E-01,-.8390322512212595E-01, ...
    -.4501404031339341E-01,-.7451523522744341E-01, ...
    -.3993939022009145,-.1254210458205579, ...
    -.1415815795205319,-.1858244299410800, ...
    -.3245512424809017,-.3317121001508232, ...
    -.3168159505701121,-.3372150239150091, ...
    -.3950013670511707,-.3336444006035868, ...
    -.3519392970001664,-.3226167582915808, ...
    -.2780042325707565,-.3720577799104590, ...
    -.3972751008974220,-.3821073616790632 ];
  ws = [ ...
    0.1694544493019982E-02,0.1462667227182682E-01, ...
    0.9589935274093377E-02,0.9835015847019813E-02, ...
    0.1710148279355958E-01,0.1516325692442914E-01, ...
    0.1746691605511999E-01,0.1604974314640067E-01, ...
    0.2185156320663785E-01,0.1242799062066869E-01, ...
    0.2646409426919389E-01,0.3135597218974045E-01, ...
    0.2736783716876112E-01,0.2345735439005822E-01, ...
    0.3130572641601596E-01,0.3548953658742431E-01, ...
    0.4036134913447077E-01,0.3792924852161072E-01, ...
    0.2440963887102594E-01,0.5132903383025206E-01, ...
    0.3177764520649842E-01,0.5417358749775593E-01, ...
    0.5180566415546370E-01,0.2633068360731991E-01, ...
    0.3893527990282211E-01,0.5027716272897634E-01, ...
    0.2208377845212325E-01,0.1429278762793107E-01, ...
    0.6697289387082959E-02,0.1648266825522313E-01, ...
    0.1688462952130244E-01,0.2190464958161271E-01, ...
    0.2281706804403004E-01,0.1956212468616595E-01, ...
    0.1994889218942623E-01,0.1737944394368884E-01, ...
    0.7302913219204132E-02,0.2128832734454982E-01, ...
    0.1333720911018169E-01,0.1494192725418561E-01, ...
    0.1152112823254964E-01,0.2472998490996246E-02, ...
    0.2018756899942699E-02,0.1470016064285112E-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
