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

%*****************************************************************************80
%
%% rule13() returns the quadrilateral rule of precision 13.
%
%  Discussion:
%
%    We suppose we are given a quadrilateral Quad with vertices
%    (0,0), (1,0), (1,1), (0,1),
%    We call a rule with n points, returning coordinates
%    x, y, and weights w.  Then the integral I of f(x,y,z) over Quad is 
%    approximated by Q as follows:
%
%    Q = area(Quad) * sum ( 1 <= i <= n ) w(i) * f(x(i),y(i)) 
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 April 2023
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Freddie Witherden, Peter Vincent,
%    On the identification of symmetric quadrature rules for finite element methods,
%    Computers and Mathematics with Applications,
%    Volume 69, pages 1232-1241, 2015.
%
%  Output:
%
%    real x(n), y(n): the coordinates of quadrature points.
%
%    real w(n): the quadrature weights, which sum to 1.
%
  x = [ ...
          0.5000000000000000, ...
          0.9917306663066228, ...
          0.5000000000000000, ...
          0.0082693336933772, ...
          0.5000000000000000, ...
          0.8199307091835548, ...
          0.5000000000000000, ...
          0.1800692908164451, ...
          0.5000000000000000, ...
          0.9593892440398557, ...
          0.9593892440398557, ...
          0.0406107559601443, ...
          0.0406107559601443, ...
          0.6898142525933719, ...
          0.6898142525933719, ...
          0.3101857474066281, ...
          0.3101857474066281, ...
          0.8497771082566756, ...
          0.8497771082566756, ...
          0.1502228917433244, ...
          0.1502228917433244, ...
          0.8217986874983090, ...
          0.9875344419529918, ...
          0.8217986874983090, ...
          0.0124655580470082, ...
          0.1782013125016910, ...
          0.9875344419529918, ...
          0.1782013125016910, ...
          0.0124655580470082, ...
          0.6667699405823916, ...
          0.9322138046335309, ...
          0.6667699405823916, ...
          0.0677861953664691, ...
          0.3332300594176084, ...
          0.9322138046335309, ...
          0.3332300594176084, ...
          0.0677861953664691 ];

  y = [ ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.9917306663066228, ...
          0.5000000000000000, ...
          0.0082693336933772, ...
          0.5000000000000000, ...
          0.8199307091835548, ...
          0.5000000000000000, ...
          0.1800692908164451, ...
          0.9593892440398557, ...
          0.0406107559601443, ...
          0.9593892440398557, ...
          0.0406107559601443, ...
          0.6898142525933719, ...
          0.3101857474066281, ...
          0.6898142525933719, ...
          0.3101857474066281, ...
          0.8497771082566756, ...
          0.1502228917433244, ...
          0.8497771082566756, ...
          0.1502228917433244, ...
          0.9875344419529918, ...
          0.8217986874983090, ...
          0.0124655580470082, ...
          0.8217986874983090, ...
          0.9875344419529918, ...
          0.1782013125016910, ...
          0.0124655580470082, ...
          0.1782013125016910, ...
          0.9322138046335309, ...
          0.6667699405823916, ...
          0.0677861953664691, ...
          0.6667699405823916, ...
          0.9322138046335309, ...
          0.3332300594176084, ...
          0.0677861953664691, ...
          0.3332300594176084 ];

  w = [ ...
          0.0749983360897274, ...
          0.0095321563374632, ...
          0.0095321563374632, ...
          0.0095321563374632, ...
          0.0095321563374632, ...
          0.0461338672424518, ...
          0.0461338672424518, ...
          0.0461338672424518, ...
          0.0461338672424518, ...
          0.0098767851618631, ...
          0.0098767851618631, ...
          0.0098767851618631, ...
          0.0098767851618631, ...
          0.0578496298501713, ...
          0.0578496298501713, ...
          0.0578496298501713, ...
          0.0578496298501713, ...
          0.0343105241782509, ...
          0.0343105241782509, ...
          0.0343105241782509, ...
          0.0343105241782509, ...
          0.0083799450125954, ...
          0.0083799450125954, ...
          0.0083799450125954, ...
          0.0083799450125954, ...
          0.0083799450125954, ...
          0.0083799450125954, ...
          0.0083799450125954, ...
          0.0083799450125954, ...
          0.0283937815910886, ...
          0.0283937815910886, ...
          0.0283937815910886, ...
          0.0283937815910886, ...
          0.0283937815910886, ...
          0.0283937815910886, ...
          0.0283937815910886, ...
          0.0283937815910886 ];

  return
end
