function [ x, y, w ] = rule13 ( n )

%*****************************************************************************80
%
%% rule13() returns the rule of degree 13.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 June 2023
%
%  Author:
%
%    Original FORTRAN77 version by Hong Xiao, Zydrunas Gimbutas.
%    This 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(n), y(n): the coordinates of the nodes.
%
%    real w(n): the weights.
%
  xs = [ ...
   -0.9572976997863074E+00, ...
    0.8595560056416388E+00, ...
    0.9572976997863074E+00, ...
   -0.8595560056416386E+00, ...
   -0.7788097115544195E+00, ...
    0.9834866824398722E+00, ...
    0.7788097115544197E+00, ...
   -0.9834866824398722E+00, ...
   -0.4758086252182752E+00, ...
    0.8500766736997490E+00, ...
    0.4758086252182753E+00, ...
   -0.8500766736997490E+00, ...
    0.3907362161294613E+00, ...
    0.9413272258729251E+00, ...
   -0.3907362161294612E+00, ...
   -0.9413272258729251E+00, ...
   -0.1381834598624646E+00, ...
    0.9589251702875351E+00, ...
    0.1381834598624647E+00, ...
   -0.9589251702875351E+00, ...
    0.6478216371870111E+00, ...
    0.7558053565720809E+00, ...
   -0.6478216371870111E+00, ...
   -0.7558053565720809E+00, ...
    0.7074150899644462E-01, ...
    0.6962500784917495E+00, ...
   -0.7074150899644453E-01, ...
   -0.6962500784917495E+00, ...
   -0.3427165560404070E+00, ...
    0.4093045616940387E+00, ...
    0.3427165560404070E+00, ...
   -0.4093045616940387E+00, ...
   -0.7375869198366919E-30 ];
  ys = [ ...
   -0.8595560056416389E+00, ...
   -0.9572976997863074E+00, ...
    0.8595560056416387E+00, ...
    0.9572976997863074E+00, ...
   -0.9834866824398722E+00, ...
   -0.7788097115544196E+00, ...
    0.9834866824398722E+00, ...
    0.7788097115544198E+00, ...
   -0.8500766736997490E+00, ...
   -0.4758086252182752E+00, ...
    0.8500766736997490E+00, ...
    0.4758086252182753E+00, ...
   -0.9413272258729251E+00, ...
    0.3907362161294612E+00, ...
    0.9413272258729251E+00, ...
   -0.3907362161294611E+00, ...
   -0.9589251702875351E+00, ...
   -0.1381834598624647E+00, ...
    0.9589251702875351E+00, ...
    0.1381834598624648E+00, ...
   -0.7558053565720809E+00, ...
    0.6478216371870111E+00, ...
    0.7558053565720809E+00, ...
   -0.6478216371870111E+00, ...
   -0.6962500784917495E+00, ...
    0.7074150899644457E-01, ...
    0.6962500784917495E+00, ...
   -0.7074150899644449E-01, ...
   -0.4093045616940387E+00, ...
   -0.3427165560404070E+00, ...
    0.4093045616940387E+00, ...
    0.3427165560404070E+00, ...
   -0.6522588594679827E-30 ];
  ws = [ ...
    0.2699339218118215E-01, ...
    0.2699339218118215E-01, ...
    0.2699339218118215E-01, ...
    0.2699339218118215E-01, ...
    0.2120743264134157E-01, ...
    0.2120743264134157E-01, ...
    0.2120743264134157E-01, ...
    0.2120743264134157E-01, ...
    0.8403587015611026E-01, ...
    0.8403587015611026E-01, ...
    0.8403587015611026E-01, ...
    0.8403587015611026E-01, ...
    0.5479564090947502E-01, ...
    0.5479564090947502E-01, ...
    0.5479564090947502E-01, ...
    0.5479564090947502E-01, ...
    0.4272687338421139E-01, ...
    0.4272687338421139E-01, ...
    0.4272687338421139E-01, ...
    0.4272687338421139E-01, ...
    0.9175668641747110E-01, ...
    0.9175668641747110E-01, ...
    0.9175668641747110E-01, ...
    0.9175668641747110E-01, ...
    0.1508552789574409E+00, ...
    0.1508552789574409E+00, ...
    0.1508552789574409E+00, ...
    0.1508552789574409E+00, ...
    0.1816350488471704E+00, ...
    0.1816350488471704E+00, ...
    0.1816350488471704E+00, ...
    0.1816350488471704E+00, ...
    0.2124022307685795E+00 ];

  x = 0.5 * ( xs + 1.0 );
  y = 0.5 * ( ys + 1.0 );
  w = ws / sqrt ( 8.0 );

  return
end
