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

%*****************************************************************************80
%
%% rule04() returns the rule of precision 4.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 April 2023
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Jan Jaskowiec, Natarajan Sukumar,
%    High order symmetric cubature rules for tetrahedra and pyramids,
%    International Journal of Numerical Methods in Engineering,
%    Volume 122, Number 1, pages 148-171, 24 August 2020.
%
%  Output:
%
%    a(n), b(n), c(n), d(n): the barycentric coordinates of quadrature points.
%
%    w(n): the quadrature weights.
%
  a = [ ...
      0.30958216531795190729, ...
      0.07125350404614427813, ...
      0.30958216531795190729, ...
      0.30958216531795190729, ...
      0.08344277230397757761, ...
      0.74967168308806730881, ...
      0.08344277230397757761, ...
      0.08344277230397757761, ...
      0.07722095407005866163, ...
      0.42277904592994131061, ...
      0.07722095407005866163, ...
      0.42277904592994131061, ...
      0.07722095407005866163, ...
      0.42277904592994131061 ];

  b = [ ...
      0.30958216531795190729, ...
      0.30958216531795190729, ...
      0.07125350404614427813, ...
      0.30958216531795190729, ...
      0.08344277230397757761, ...
      0.08344277230397757761, ...
      0.74967168308806730881, ...
      0.08344277230397757761, ...
      0.42277904592994131061, ...
      0.07722095407005866163, ...
      0.07722095407005866163, ...
      0.42277904592994131061, ...
      0.42277904592994131061, ...
      0.07722095407005866163 ];

  c = [ ...
      0.30958216531795190729, ...
      0.30958216531795190729, ...
      0.30958216531795190729, ...
      0.07125350404614427813, ...
      0.08344277230397757761, ...
      0.08344277230397757761, ...
      0.08344277230397757761, ...
      0.74967168308806730881, ...
      0.42277904592994131061, ...
      0.42277904592994131061, ...
      0.42277904592994131061, ...
      0.07722095407005866163, ...
      0.07722095407005866163, ...
      0.07722095407005866163 ];

  d = [ ...
      0.07125350404614427813, ...
      0.30958216531795190729, ...
      0.30958216531795190729, ...
      0.30958216531795190729, ...
      0.74967168308806730881, ...
      0.08344277230397757761, ...
      0.08344277230397757761, ...
      0.08344277230397757761, ...
      0.07722095407005866163, ...
      0.07722095407005866163, ...
      0.42277904592994131061, ...
      0.07722095407005866163, ...
      0.42277904592994131061, ...
      0.42277904592994131061 ];

  w = [ ...
      0.06540916363445217763, ...
      0.06540916363445217763, ...
      0.06540916363445217763, ...
      0.06540916363445217763, ...
      0.05935526423100475485, ...
      0.05935526423100475485, ...
      0.05935526423100475485, ...
      0.05935526423100475485, ...
      0.08349038142302871168, ...
      0.08349038142302871168, ...
      0.08349038142302871168, ...
      0.08349038142302871168, ...
      0.08349038142302871168, ...
      0.08349038142302871168 ];

  return
end
