function [ x, y, z, w ] = rule09 ( )

%*****************************************************************************80
%
%% rule09() returns the pyramid quadrature rule of precision 9.
%
%  Discussion:
%
%    We suppose we are given a pyramid P with vertices
%      (-1,-1,0), (-1,+1,0), (+1,+1,0), (+1,-1,0), (0,0,1).
%    We call a rule with n points, returning coordinates
%    x, y, z, and weights w.  Then the integral I of f(x,y,z) over
%    P is approximated by Q as follows:
%
%    Q = volume(P) * sum ( 1 <= i <= n ) w(i) * f(x(i),y(i),z(i)) 
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 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:
%
%    x(n), y(n), z(n): the coordinates of quadrature points.
%
%    w(n): the quadrature weights, which sum to 1.
%
  x = [ ...
          0.0000000000000000, ...
          0.0000000000000000, ...
          0.9258200958608426, ...
          0.0000000000000000, ...
         -0.9258200958608426, ...
          0.0000000000000000, ...
          0.6760969921163639, ...
          0.0000000000000000, ...
         -0.6760969921163639, ...
          0.0000000000000000, ...
          0.6163321778509252, ...
          0.0000000000000000, ...
         -0.6163321778509252, ...
          0.0000000000000000, ...
          0.4319711692851803, ...
          0.0000000000000000, ...
         -0.4319711692851803, ...
          0.0000000000000000, ...
          0.2418018136307699, ...
          0.2418018136307699, ...
         -0.2418018136307699, ...
         -0.2418018136307699, ...
          0.8440791629031899, ...
          0.8440791629031899, ...
         -0.8440791629031899, ...
         -0.8440791629031899, ...
          0.2279669387608253, ...
          0.2279669387608253, ...
         -0.2279669387608253, ...
         -0.2279669387608253, ...
          0.5027849771350101, ...
          0.5027849771350101, ...
         -0.5027849771350101, ...
         -0.5027849771350101, ...
          0.2605010749834311, ...
          0.2605010749834311, ...
         -0.2605010749834311, ...
         -0.2605010749834311, ...
          0.0926958730867243, ...
          0.0926958730867243, ...
         -0.0926958730867243, ...
         -0.0926958730867243, ...
          0.4832161680706445, ...
          0.4832161680706445, ...
         -0.4832161680706445, ...
         -0.4832161680706445, ...
          0.5671855056082324, ...
          0.5671855056082324, ...
         -0.5671855056082324, ...
         -0.5671855056082324, ...
          0.8463949915138761, ...
          0.8463949915138761, ...
         -0.8463949915138761, ...
         -0.8463949915138761, ...
          0.8471778681177453, ...
          0.4641907129661463, ...
          0.8471778681177453, ...
         -0.4641907129661463, ...
         -0.8471778681177453, ...
          0.4641907129661463, ...
         -0.8471778681177453, ...
         -0.4641907129661463 ];

  y = [ ...
          0.0000000000000000, ...
          0.0000000000000000, ...
          0.0000000000000000, ...
          0.9258200958608426, ...
          0.0000000000000000, ...
         -0.9258200958608426, ...
          0.0000000000000000, ...
          0.6760969921163639, ...
          0.0000000000000000, ...
         -0.6760969921163639, ...
          0.0000000000000000, ...
          0.6163321778509252, ...
          0.0000000000000000, ...
         -0.6163321778509252, ...
          0.0000000000000000, ...
          0.4319711692851803, ...
          0.0000000000000000, ...
         -0.4319711692851803, ...
          0.2418018136307699, ...
         -0.2418018136307699, ...
          0.2418018136307699, ...
         -0.2418018136307699, ...
          0.8440791629031899, ...
         -0.8440791629031899, ...
          0.8440791629031899, ...
         -0.8440791629031899, ...
          0.2279669387608253, ...
         -0.2279669387608253, ...
          0.2279669387608253, ...
         -0.2279669387608253, ...
          0.5027849771350101, ...
         -0.5027849771350101, ...
          0.5027849771350101, ...
         -0.5027849771350101, ...
          0.2605010749834311, ...
         -0.2605010749834311, ...
          0.2605010749834311, ...
         -0.2605010749834311, ...
          0.0926958730867243, ...
         -0.0926958730867243, ...
          0.0926958730867243, ...
         -0.0926958730867243, ...
          0.4832161680706445, ...
         -0.4832161680706445, ...
          0.4832161680706445, ...
         -0.4832161680706445, ...
          0.5671855056082324, ...
         -0.5671855056082324, ...
          0.5671855056082324, ...
         -0.5671855056082324, ...
          0.8463949915138761, ...
         -0.8463949915138761, ...
          0.8463949915138761, ...
         -0.8463949915138761, ...
          0.4641907129661463, ...
          0.8471778681177453, ...
         -0.4641907129661463, ...
          0.8471778681177453, ...
          0.4641907129661463, ...
         -0.8471778681177453, ...
         -0.4641907129661463, ...
         -0.8471778681177453 ];

  z = [ ...
          0.0371459309315055, ...
          0.6942002631703261, ...
          0.0000000042251285, ...
          0.0000000042251285, ...
          0.0000000042251285, ...
          0.0000000042251285, ...
          0.2697317845200571, ...
          0.2697317845200571, ...
          0.2697317845200571, ...
          0.2697317845200571, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.5334178104457834, ...
          0.5334178104457834, ...
          0.5334178104457834, ...
          0.5334178104457834, ...
          0.6619880087153507, ...
          0.6619880087153507, ...
          0.6619880087153507, ...
          0.6619880087153507, ...
          0.1522047098054636, ...
          0.1522047098054636, ...
          0.1522047098054636, ...
          0.1522047098054636, ...
          0.4222655365894455, ...
          0.4222655365894455, ...
          0.4222655365894455, ...
          0.4222655365894455, ...
          0.3967643698988902, ...
          0.3967643698988902, ...
          0.3967643698988902, ...
          0.3967643698988902, ...
          0.2008207219371707, ...
          0.2008207219371707, ...
          0.2008207219371707, ...
          0.2008207219371707, ...
          0.8661453707796378, ...
          0.8661453707796378, ...
          0.8661453707796378, ...
          0.8661453707796378, ...
          0.0195040124924115, ...
          0.0195040124924115, ...
          0.0195040124924115, ...
          0.0195040124924115, ...
          0.2131686017065601, ...
          0.2131686017065601, ...
          0.2131686017065601, ...
          0.2131686017065601, ...
          0.0153477972480097, ...
          0.0153477972480097, ...
          0.0153477972480097, ...
          0.0153477972480097, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.0833333333333333, ...
          0.0833333333333333 ];

  w = [ ...
          0.0320478691353425, ...
          0.0237932209450781, ...
          0.0041733723029944, ...
          0.0041733723029944, ...
          0.0041733723029944, ...
          0.0041733723029944, ...
          0.0222937913596180, ...
          0.0222937913596180, ...
          0.0222937913596180, ...
          0.0222937913596180, ...
          0.0291280227779532, ...
          0.0291280227779532, ...
          0.0291280227779532, ...
          0.0291280227779532, ...
          0.0115418065483010, ...
          0.0115418065483010, ...
          0.0115418065483010, ...
          0.0115418065483010, ...
          0.0101005748273597, ...
          0.0101005748273597, ...
          0.0101005748273597, ...
          0.0101005748273597, ...
          0.0020589782014206, ...
          0.0020589782014206, ...
          0.0020589782014206, ...
          0.0020589782014206, ...
          0.0342456887657178, ...
          0.0342456887657178, ...
          0.0342456887657178, ...
          0.0342456887657178, ...
          0.0129094136418972, ...
          0.0129094136418972, ...
          0.0129094136418972, ...
          0.0129094136418972, ...
          0.0371122811478335, ...
          0.0371122811478335, ...
          0.0371122811478335, ...
          0.0371122811478335, ...
          0.0022186981787511, ...
          0.0022186981787511, ...
          0.0022186981787511, ...
          0.0022186981787511, ...
          0.0159562091361951, ...
          0.0159562091361951, ...
          0.0159562091361951, ...
          0.0159562091361951, ...
          0.0230673181273276, ...
          0.0230673181273276, ...
          0.0230673181273276, ...
          0.0230673181273276, ...
          0.0045994005726981, ...
          0.0045994005726981, ...
          0.0045994005726981, ...
          0.0045994005726981, ...
          0.0133170859459138, ...
          0.0133170859459138, ...
          0.0133170859459138, ...
          0.0133170859459138, ...
          0.0133170859459138, ...
          0.0133170859459138, ...
          0.0133170859459138, ...
          0.0133170859459138 ];

  return
end
