function [ x, w ] = rule08 ( n )

%*****************************************************************************80
%
%% RULE08 returns the rule of degree 8.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    01 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(2,N), the coordinates of the nodes.
%
%    Output, real W(N), the weights.
%
  xs = [ ...
    0.6306801197316689E+00, ...
    0.9688499663619776E+00, ...
   -0.6306801197316687E+00, ...
   -0.9688499663619776E+00, ...
   -0.7502770999789002E+00, ...
    0.9279616459595696E+00, ...
    0.7502770999789005E+00, ...
   -0.9279616459595696E+00, ...
   -0.7620832819261708E-01, ...
    0.8526157293336623E+00, ...
    0.7620832819261719E-01, ...
   -0.8526157293336623E+00, ...
   -0.5237358202144292E+00, ...
    0.4533398211356472E+00, ...
    0.5237358202144292E+00, ...
   -0.4533398211356471E+00, ...
    0.1018964154952896E-32 ];
  ys = [ ...
   -0.9688499663619776E+00, ...
    0.6306801197316688E+00, ...
    0.9688499663619776E+00, ...
   -0.6306801197316686E+00, ...
   -0.9279616459595696E+00, ...
   -0.7502770999789004E+00, ...
    0.9279616459595696E+00, ...
    0.7502770999789006E+00, ...
   -0.8526157293336623E+00, ...
   -0.7620832819261714E-01, ...
    0.8526157293336623E+00, ...
    0.7620832819261725E-01, ...
   -0.4533398211356472E+00, ...
   -0.5237358202144292E+00, ...
    0.4533398211356471E+00, ...
    0.5237358202144292E+00, ...
   -0.7403196379681869E-32 ];
  ws = [ ...
    0.6284721101179121E-01, ...
    0.6284721101179121E-01, ...
    0.6284721101179121E-01, ...
    0.6284721101179121E-01, ...
    0.7926638883415160E-01, ...
    0.7926638883415160E-01, ...
    0.7926638883415160E-01, ...
    0.7926638883415160E-01, ...
    0.1902480253324004E+00, ...
    0.1902480253324004E+00, ...
    0.1902480253324004E+00, ...
    0.1902480253324004E+00, ...
    0.2816282136297291E+00, ...
    0.2816282136297291E+00, ...
    0.2816282136297291E+00, ...
    0.2816282136297291E+00, ...
    0.3724677695139019E+00 ];

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

  return
end