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

%*****************************************************************************80
%
%% rule09() returns the rule of precision 9.
%
%  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.25000000000000000000, ...
      0.00000000061981697552, ...
      0.00000000061981697552, ...
      0.99999999814054896241, ...
      0.00000000061981697552, ...
      0.16077453539526159743, ...
      0.16077453539526159743, ...
      0.51767639381421526323, ...
      0.16077453539526159743, ...
      0.32227652182142096926, ...
      0.32227652182142096926, ...
      0.03317043453573709222, ...
      0.32227652182142096926, ...
      0.04510891834541358447, ...
      0.04510891834541358447, ...
      0.86467324496375930210, ...
      0.04510891834541358447, ...
      0.11229654600437605216, ...
      0.38770345399562394784, ...
      0.11229654600437605216, ...
      0.11229654600437605216, ...
      0.38770345399562394784, ...
      0.38770345399562394784, ...
      0.00255457923304130974, ...
      0.00255457923304130974, ...
      0.45887144875245927667, ...
      0.07970252326204013693, ...
      0.45887144875245927667, ...
      0.45887144875245927667, ...
      0.07970252326204013693, ...
      0.45887144875245927667, ...
      0.45887144875245927667, ...
      0.45887144875245927667, ...
      0.07970252326204013693, ...
      0.00255457923304130974, ...
      0.71835032644207452712, ...
      0.71835032644207452712, ...
      0.03377587068533860482, ...
      0.21409793218724831876, ...
      0.03377587068533860482, ...
      0.03377587068533860482, ...
      0.21409793218724831876, ...
      0.03377587068533860482, ...
      0.03377587068533860482, ...
      0.03377587068533860482, ...
      0.21409793218724831876, ...
      0.71835032644207452712, ...
      0.03441591057817527943, ...
      0.03441591057817527943, ...
      0.18364136980992790127, ...
      0.59830134980196891803, ...
      0.18364136980992790127, ...
      0.18364136980992790127, ...
      0.59830134980196891803, ...
      0.18364136980992790127, ...
      0.18364136980992790127, ...
      0.18364136980992790127, ...
      0.59830134980196891803, ...
      0.03441591057817527943 ];

  b = [ ...
      0.25000000000000000000, ...
      0.00000000061981697552, ...
      0.99999999814054896241, ...
      0.00000000061981697552, ...
      0.00000000061981697552, ...
      0.16077453539526159743, ...
      0.51767639381421526323, ...
      0.16077453539526159743, ...
      0.16077453539526159743, ...
      0.32227652182142096926, ...
      0.03317043453573709222, ...
      0.32227652182142096926, ...
      0.32227652182142096926, ...
      0.04510891834541358447, ...
      0.86467324496375930210, ...
      0.04510891834541358447, ...
      0.04510891834541358447, ...
      0.38770345399562394784, ...
      0.11229654600437605216, ...
      0.11229654600437605216, ...
      0.38770345399562394784, ...
      0.11229654600437605216, ...
      0.38770345399562394784, ...
      0.45887144875245927667, ...
      0.45887144875245927667, ...
      0.45887144875245927667, ...
      0.00255457923304130974, ...
      0.07970252326204013693, ...
      0.00255457923304130974, ...
      0.45887144875245927667, ...
      0.07970252326204013693, ...
      0.45887144875245927667, ...
      0.00255457923304130974, ...
      0.45887144875245927667, ...
      0.07970252326204013693, ...
      0.03377587068533860482, ...
      0.03377587068533860482, ...
      0.03377587068533860482, ...
      0.71835032644207452712, ...
      0.21409793218724831876, ...
      0.71835032644207452712, ...
      0.03377587068533860482, ...
      0.21409793218724831876, ...
      0.03377587068533860482, ...
      0.71835032644207452712, ...
      0.03377587068533860482, ...
      0.21409793218724831876, ...
      0.18364136980992790127, ...
      0.18364136980992790127, ...
      0.18364136980992790127, ...
      0.03441591057817527943, ...
      0.59830134980196891803, ...
      0.03441591057817527943, ...
      0.18364136980992790127, ...
      0.59830134980196891803, ...
      0.18364136980992790127, ...
      0.03441591057817527943, ...
      0.18364136980992790127, ...
      0.59830134980196891803 ];

  c = [ ...
      0.25000000000000000000, ...
      0.99999999814054896241, ...
      0.00000000061981697552, ...
      0.00000000061981697552, ...
      0.00000000061981697552, ...
      0.51767639381421526323, ...
      0.16077453539526159743, ...
      0.16077453539526159743, ...
      0.16077453539526159743, ...
      0.03317043453573709222, ...
      0.32227652182142096926, ...
      0.32227652182142096926, ...
      0.32227652182142096926, ...
      0.86467324496375930210, ...
      0.04510891834541358447, ...
      0.04510891834541358447, ...
      0.04510891834541358447, ...
      0.38770345399562394784, ...
      0.38770345399562394784, ...
      0.38770345399562394784, ...
      0.11229654600437605216, ...
      0.11229654600437605216, ...
      0.11229654600437605216, ...
      0.07970252326204013693, ...
      0.45887144875245927667, ...
      0.00255457923304130974, ...
      0.45887144875245927667, ...
      0.00255457923304130974, ...
      0.45887144875245927667, ...
      0.00255457923304130974, ...
      0.45887144875245927667, ...
      0.07970252326204013693, ...
      0.07970252326204013693, ...
      0.45887144875245927667, ...
      0.45887144875245927667, ...
      0.21409793218724831876, ...
      0.03377587068533860482, ...
      0.71835032644207452712, ...
      0.03377587068533860482, ...
      0.71835032644207452712, ...
      0.03377587068533860482, ...
      0.71835032644207452712, ...
      0.03377587068533860482, ...
      0.21409793218724831876, ...
      0.21409793218724831876, ...
      0.03377587068533860482, ...
      0.03377587068533860482, ...
      0.59830134980196891803, ...
      0.18364136980992790127, ...
      0.03441591057817527943, ...
      0.18364136980992790127, ...
      0.03441591057817527943, ...
      0.18364136980992790127, ...
      0.03441591057817527943, ...
      0.18364136980992790127, ...
      0.59830134980196891803, ...
      0.59830134980196891803, ...
      0.18364136980992790127, ...
      0.18364136980992790127 ];

  d = [ ...
      0.25000000000000000000, ...
      0.00000000061981708654, ...
      0.00000000061981708654, ...
      0.00000000061981708654, ...
      0.99999999814054907343, ...
      0.16077453539526143089, ...
      0.16077453539526148640, ...
      0.16077453539526154191, ...
      0.51767639381421504119, ...
      0.32227652182142096926, ...
      0.32227652182142096926, ...
      0.32227652182142096926, ...
      0.03317043453573709222, ...
      0.04510891834541341794, ...
      0.04510891834541347345, ...
      0.04510891834541352896, ...
      0.86467324496375908005, ...
      0.11229654600437599665, ...
      0.11229654600437605216, ...
      0.38770345399562383681, ...
      0.38770345399562389233, ...
      0.38770345399562394784, ...
      0.11229654600437610767, ...
      0.45887144875245938769, ...
      0.07970252326204024795, ...
      0.07970252326204019244, ...
      0.45887144875245938769, ...
      0.45887144875245933218, ...
      0.07970252326204024795, ...
      0.45887144875245933218, ...
      0.00255457923304136525, ...
      0.00255457923304136525, ...
      0.45887144875245938769, ...
      0.00255457923304136525, ...
      0.45887144875245938769, ...
      0.03377587068533854930, ...
      0.21409793218724826325, ...
      0.21409793218724826325, ...
      0.03377587068533860482, ...
      0.03377587068533860482, ...
      0.21409793218724826325, ...
      0.03377587068533860482, ...
      0.71835032644207452712, ...
      0.71835032644207452712, ...
      0.03377587068533854930, ...
      0.71835032644207452712, ...
      0.03377587068533854930, ...
      0.18364136980992795678, ...
      0.59830134980196891803, ...
      0.59830134980196880701, ...
      0.18364136980992790127, ...
      0.18364136980992784576, ...
      0.59830134980196891803, ...
      0.18364136980992790127, ...
      0.03441591057817522392, ...
      0.03441591057817516841, ...
      0.18364136980992784576, ...
      0.03441591057817527943, ...
      0.18364136980992790127 ];

  w = [ ...
      0.05801054891248025314, ...
      0.00006431928175925639, ...
      0.00006431928175925639, ...
      0.00006431928175925639, ...
      0.00006431928175925639, ...
      0.02317333846242545722, ...
      0.02317333846242545722, ...
      0.02317333846242545722, ...
      0.02317333846242545722, ...
      0.02956291233542928526, ...
      0.02956291233542928526, ...
      0.02956291233542928526, ...
      0.02956291233542928526, ...
      0.00806397997961618221, ...
      0.00806397997961618221, ...
      0.00806397997961618221, ...
      0.00806397997961618221, ...
      0.03813408010370246404, ...
      0.03813408010370246404, ...
      0.03813408010370246404, ...
      0.03813408010370246404, ...
      0.03813408010370246404, ...
      0.03813408010370246404, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.00838442219829855194, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.01023455935274532845, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878, ...
      0.02052491596798813878 ];

  return
end
