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

%*****************************************************************************80
%
%% rule12() returns the rule of degree 12.
%
%  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.9572976997863073E+00, ...
    0.8595560056416388E+00, ...
    0.9572976997863073E+00, ...
   -0.8595560056416386E+00, ...
   -0.7788097115544194E+00, ...
    0.9834866824398721E+00, ...
    0.7788097115544196E+00, ...
   -0.9834866824398721E+00, ...
   -0.4758086252182758E+00, ...
    0.8500766736997486E+00, ...
    0.4758086252182759E+00, ...
   -0.8500766736997486E+00, ...
   -0.7558053565720815E+00, ...
    0.6478216371870107E+00, ...
    0.7558053565720815E+00, ...
   -0.6478216371870107E+00, ...
   -0.3427165560404068E+00, ...
    0.4093045616940387E+00, ...
    0.3427165560404068E+00, ...
   -0.4093045616940387E+00, ...
   -0.1381834598624653E+00, ...
    0.9589251702875349E+00, ...
    0.1381834598624654E+00, ...
   -0.9589251702875349E+00, ...
    0.7074150899644485E-01, ...
    0.6962500784917494E+00, ...
   -0.7074150899644477E-01, ...
   -0.6962500784917494E+00, ...
    0.3907362161294610E+00, ...
    0.9413272258729252E+00, ...
   -0.3907362161294609E+00, ...
   -0.9413272258729252E+00, ...
   -0.3126032252245169E-31 ];
  ys = [ ...
   -0.8595560056416389E+00, ...
   -0.9572976997863073E+00, ...
    0.8595560056416387E+00, ...
    0.9572976997863073E+00, ...
   -0.9834866824398721E+00, ...
   -0.7788097115544195E+00, ...
    0.9834866824398721E+00, ...
    0.7788097115544197E+00, ...
   -0.8500766736997486E+00, ...
   -0.4758086252182758E+00, ...
    0.8500766736997486E+00, ...
    0.4758086252182759E+00, ...
   -0.6478216371870107E+00, ...
   -0.7558053565720815E+00, ...
    0.6478216371870107E+00, ...
    0.7558053565720815E+00, ...
   -0.4093045616940387E+00, ...
   -0.3427165560404068E+00, ...
    0.4093045616940387E+00, ...
    0.3427165560404068E+00, ...
   -0.9589251702875349E+00, ...
   -0.1381834598624653E+00, ...
    0.9589251702875349E+00, ...
    0.1381834598624654E+00, ...
   -0.6962500784917494E+00, ...
    0.7074150899644481E-01, ...
    0.6962500784917494E+00, ...
   -0.7074150899644473E-01, ...
   -0.9413272258729252E+00, ...
    0.3907362161294610E+00, ...
    0.9413272258729252E+00, ...
   -0.3907362161294609E+00, ...
   -0.1114446878059780E-31 ];
  ws = [ ...
    0.2699339218118220E-01, ...
    0.2699339218118220E-01, ...
    0.2699339218118220E-01, ...
    0.2699339218118220E-01, ...
    0.2120743264134161E-01, ...
    0.2120743264134161E-01, ...
    0.2120743264134161E-01, ...
    0.2120743264134161E-01, ...
    0.8403587015611028E-01, ...
    0.8403587015611028E-01, ...
    0.8403587015611028E-01, ...
    0.8403587015611028E-01, ...
    0.9175668641747105E-01, ...
    0.9175668641747105E-01, ...
    0.9175668641747105E-01, ...
    0.9175668641747105E-01, ...
    0.1816350488471703E+00, ...
    0.1816350488471703E+00, ...
    0.1816350488471703E+00, ...
    0.1816350488471703E+00, ...
    0.4272687338421145E-01, ...
    0.4272687338421145E-01, ...
    0.4272687338421145E-01, ...
    0.4272687338421145E-01, ...
    0.1508552789574408E+00, ...
    0.1508552789574408E+00, ...
    0.1508552789574408E+00, ...
    0.1508552789574408E+00, ...
    0.5479564090947486E-01, ...
    0.5479564090947486E-01, ...
    0.5479564090947486E-01, ...
    0.5479564090947486E-01, ...
    0.2124022307685798E+00 ];

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

  return
end
