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

%*****************************************************************************80
%
%% rule06() returns the rule of precision 6.
%
%  Discussion:
%
%    The data is given for the reference tetrahedron
%    with vertices (0,0,0), (1,0,0), (0,1,0), (0,0,1).
%
%    We suppose we are given a tetrahedron T with vertices A, B, C, D.
%    We call a rule with n points, returning barycentric coordinates
%    a, b, c, d, and weights w.  Then the integral I of f(x,y,z) over T is 
%    approximated by Q as follows:
%
%    (x,y,z) = a(1:n) * A + b(1:n) * B + c(1:n) * C + d(1:n * D
%    Q = area(T) * sum ( 1 <= i <= n ) w(i) * f(x(i),y(i),z(i)) 
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 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:
%
%    a(n), b(n), c(n), d(n): the barycentric coordinates of quadrature points.
%
%    w(n): the quadrature weights, which sum to 1.
%
  a = [ ...
      0.04067395853461136523, ...
      0.04067395853461136523, ...
      0.87797812439616595981, ...
      0.04067395853461136523, ...
      0.32233789014227554048, ...
      0.32233789014227554048, ...
      0.03298632957317348957, ...
      0.32233789014227554048, ...
      0.21460287125915200601, ...
      0.21460287125915200601, ...
      0.35619138622254387094, ...
      0.21460287125915200601, ...
      0.60300566479164918743, ...
      0.60300566479164918743, ...
      0.06366100187501749774, ...
      0.26967233145831581709, ...
      0.06366100187501749774, ...
      0.06366100187501749774, ...
      0.26967233145831581709, ...
      0.06366100187501749774, ...
      0.06366100187501749774, ...
      0.06366100187501749774, ...
      0.26967233145831581709, ...
      0.60300566479164918743 ];

  b = [ ...
      0.04067395853461136523, ...
      0.87797812439616595981, ...
      0.04067395853461136523, ...
      0.04067395853461136523, ...
      0.32233789014227554048, ...
      0.03298632957317348957, ...
      0.32233789014227554048, ...
      0.32233789014227554048, ...
      0.21460287125915200601, ...
      0.35619138622254387094, ...
      0.21460287125915200601, ...
      0.21460287125915200601, ...
      0.06366100187501749774, ...
      0.06366100187501749774, ...
      0.06366100187501749774, ...
      0.60300566479164918743, ...
      0.26967233145831581709, ...
      0.60300566479164918743, ...
      0.06366100187501749774, ...
      0.26967233145831581709, ...
      0.06366100187501749774, ...
      0.60300566479164918743, ...
      0.06366100187501749774, ...
      0.26967233145831581709 ];

  c = [ ...
      0.87797812439616595981, ...
      0.04067395853461136523, ...
      0.04067395853461136523, ...
      0.04067395853461136523, ...
      0.03298632957317348957, ...
      0.32233789014227554048, ...
      0.32233789014227554048, ...
      0.32233789014227554048, ...
      0.35619138622254387094, ...
      0.21460287125915200601, ...
      0.21460287125915200601, ...
      0.21460287125915200601, ...
      0.26967233145831581709, ...
      0.06366100187501749774, ...
      0.60300566479164918743, ...
      0.06366100187501749774, ...
      0.60300566479164918743, ...
      0.06366100187501749774, ...
      0.60300566479164918743, ...
      0.06366100187501749774, ...
      0.26967233145831581709, ...
      0.26967233145831581709, ...
      0.06366100187501749774, ...
      0.06366100187501749774 ];

  d = [ ...
      0.04067395853461119870, ...
      0.04067395853461125421, ...
      0.04067395853461130972, ...
      0.87797812439616573776, ...
      0.32233789014227542946, ...
      0.32233789014227542946, ...
      0.32233789014227542946, ...
      0.03298632957317337855, ...
      0.21460287125915211703, ...
      0.21460287125915211703, ...
      0.21460287125915211703, ...
      0.35619138622254398197, ...
      0.06366100187501749774, ...
      0.26967233145831581709, ...
      0.26967233145831592811, ...
      0.06366100187501749774, ...
      0.06366100187501755325, ...
      0.26967233145831587260, ...
      0.06366100187501755325, ...
      0.60300566479164929845, ...
      0.60300566479164929845, ...
      0.06366100187501755325, ...
      0.60300566479164929845, ...
      0.06366100187501749774 ];

  w = [ ...
      0.01007721105532064301, ...
      0.01007721105532064301, ...
      0.01007721105532064301, ...
      0.01007721105532064301, ...
      0.05535718154365472377, ...
      0.05535718154365472377, ...
      0.05535718154365472377, ...
      0.05535718154365472377, ...
      0.03992275025816749423, ...
      0.03992275025816749423, ...
      0.03992275025816749423, ...
      0.03992275025816749423, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953, ...
      0.04821428571428570953 ];

  return
end
