function [ a, b, c, w ] = rule04 ( )

%*****************************************************************************80
%
%% rule04() returns the rule of precision 4.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 June 2023
%
%  Author:
%
%    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.
%
%  Output:
%
%    real a(n), b(n), c(n): the barycentric coordinates of quadrature points.
%
%    real w(n): the quadrature weights.
%
  a = [ ...
          0.4459484909159648, ...
          0.4459484909159649, ...
          0.1081030181680702, ...
          0.0915762135097707, ...
          0.8168475729804584, ...
          0.0915762135097710 ];

  b = [ ...
          0.1081030181680703, ...
          0.4459484909159649, ...
          0.4459484909159651, ...
          0.0915762135097709, ...
          0.0915762135097707, ...
          0.8168475729804585 ];

  c = [ ...
          0.4459484909159649, ...
          0.1081030181680702, ...
          0.4459484909159647, ...
          0.8168475729804585, ...
          0.0915762135097709, ...
          0.0915762135097705 ];

  w = [ ...
          0.2233815896780115, ...
          0.2233815896780115, ...
          0.2233815896780115, ...
          0.1099517436553219, ...
          0.1099517436553219, ...
          0.1099517436553219 ];

  return
end
