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

%*****************************************************************************80
%
%% rule09() returns the prism rule of precision 9.
%
%  Discussion:
%
%    We suppose we are given a triangular prism P with vertices
%    (1,0,0), (0,1,0), (0,0,0),
%    (1,0,1), (0,1,1), (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:
%
%    02 May 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:
%
%    real x(n), y(n), z(n): the coordinates of quadrature points.
%
%    real w(n): the quadrature weights, which sum to 1.
%
  x = [ ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.4938630638969568, ...
          0.4938630638969568, ...
          0.0122738722060863, ...
          0.2362540169543293, ...
          0.2362540169543293, ...
          0.5274919660913414, ...
          0.2362540169543293, ...
          0.2362540169543293, ...
          0.5274919660913414, ...
          0.0722383394163824, ...
          0.0722383394163824, ...
          0.8555233211672353, ...
          0.0722383394163824, ...
          0.0722383394163824, ...
          0.8555233211672353, ...
          0.4383137607101617, ...
          0.4383137607101617, ...
          0.1233724785796766, ...
          0.4383137607101617, ...
          0.4383137607101617, ...
          0.1233724785796766, ...
          0.0364340164940779, ...
          0.0364340164940779, ...
          0.9271319670118442, ...
          0.0364340164940779, ...
          0.0364340164940779, ...
          0.9271319670118442, ...
          0.4828779929693860, ...
          0.4828779929693860, ...
          0.0342440140612279, ...
          0.4828779929693860, ...
          0.4828779929693860, ...
          0.0342440140612279, ...
          0.1628698857202373, ...
          0.1628698857202373, ...
          0.6742602285595254, ...
          0.1628698857202373, ...
          0.1628698857202373, ...
          0.6742602285595254, ...
          0.8213377527237301, ...
          0.1626087609745086, ...
          0.8213377527237301, ...
          0.0160534863017613, ...
          0.1626087609745086, ...
          0.0160534863017613, ...
          0.0424944495063928, ...
          0.2561926710584905, ...
          0.0424944495063928, ...
          0.7013128794351167, ...
          0.2561926710584905, ...
          0.7013128794351167, ...
          0.0424944495063928, ...
          0.2561926710584905, ...
          0.0424944495063928, ...
          0.7013128794351167, ...
          0.2561926710584905, ...
          0.7013128794351167 ];

  y = [ ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.4938630638969568, ...
          0.0122738722060863, ...
          0.4938630638969568, ...
          0.2362540169543293, ...
          0.5274919660913414, ...
          0.2362540169543293, ...
          0.2362540169543293, ...
          0.5274919660913414, ...
          0.2362540169543293, ...
          0.0722383394163824, ...
          0.8555233211672353, ...
          0.0722383394163824, ...
          0.0722383394163824, ...
          0.8555233211672353, ...
          0.0722383394163824, ...
          0.4383137607101617, ...
          0.1233724785796766, ...
          0.4383137607101617, ...
          0.4383137607101617, ...
          0.1233724785796766, ...
          0.4383137607101617, ...
          0.0364340164940779, ...
          0.9271319670118442, ...
          0.0364340164940779, ...
          0.0364340164940779, ...
          0.9271319670118442, ...
          0.0364340164940779, ...
          0.4828779929693860, ...
          0.0342440140612279, ...
          0.4828779929693860, ...
          0.4828779929693860, ...
          0.0342440140612279, ...
          0.4828779929693860, ...
          0.1628698857202373, ...
          0.6742602285595254, ...
          0.1628698857202373, ...
          0.1628698857202373, ...
          0.6742602285595254, ...
          0.1628698857202373, ...
          0.1626087609745086, ...
          0.8213377527237301, ...
          0.0160534863017613, ...
          0.8213377527237301, ...
          0.0160534863017613, ...
          0.1626087609745086, ...
          0.2561926710584905, ...
          0.0424944495063928, ...
          0.7013128794351167, ...
          0.0424944495063928, ...
          0.7013128794351167, ...
          0.2561926710584905, ...
          0.2561926710584905, ...
          0.0424944495063928, ...
          0.7013128794351167, ...
          0.0424944495063928, ...
          0.7013128794351167, ...
          0.2561926710584905 ];

  z = [ ...
          0.3624907904961116, ...
          0.6375092095038883, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.9356193788144789, ...
          0.9356193788144789, ...
          0.9356193788144789, ...
          0.0643806211855212, ...
          0.0643806211855212, ...
          0.0643806211855212, ...
          0.9775968701180802, ...
          0.9775968701180802, ...
          0.9775968701180802, ...
          0.0224031298819198, ...
          0.0224031298819198, ...
          0.0224031298819198, ...
          0.7182058908565040, ...
          0.7182058908565040, ...
          0.7182058908565040, ...
          0.2817941091434960, ...
          0.2817941091434960, ...
          0.2817941091434960, ...
          0.7515028180283210, ...
          0.7515028180283210, ...
          0.7515028180283210, ...
          0.2484971819716791, ...
          0.2484971819716791, ...
          0.2484971819716791, ...
          0.0091271384992068, ...
          0.0091271384992068, ...
          0.0091271384992068, ...
          0.9908728615007932, ...
          0.9908728615007932, ...
          0.9908728615007932, ...
          0.4125665631901645, ...
          0.4125665631901645, ...
          0.4125665631901645, ...
          0.5874334368098355, ...
          0.5874334368098355, ...
          0.5874334368098355, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.8418079279883068, ...
          0.8418079279883068, ...
          0.8418079279883068, ...
          0.8418079279883068, ...
          0.8418079279883068, ...
          0.8418079279883068, ...
          0.1581920720116932, ...
          0.1581920720116932, ...
          0.1581920720116932, ...
          0.1581920720116932, ...
          0.1581920720116932, ...
          0.1581920720116932 ];

  w = [ ...
          0.0342834712909237, ...
          0.0342834712909237, ...
          0.0163927977044536, ...
          0.0163927977044536, ...
          0.0163927977044536, ...
          0.0234717806987032, ...
          0.0234717806987032, ...
          0.0234717806987032, ...
          0.0234717806987032, ...
          0.0234717806987032, ...
          0.0234717806987032, ...
          0.0057618481582789, ...
          0.0057618481582789, ...
          0.0057618481582789, ...
          0.0057618481582789, ...
          0.0057618481582789, ...
          0.0057618481582789, ...
          0.0349247930577802, ...
          0.0349247930577802, ...
          0.0349247930577802, ...
          0.0349247930577802, ...
          0.0349247930577802, ...
          0.0349247930577802, ...
          0.0073738996232123, ...
          0.0073738996232123, ...
          0.0073738996232123, ...
          0.0073738996232123, ...
          0.0073738996232123, ...
          0.0073738996232123, ...
          0.0057224608464489, ...
          0.0057224608464489, ...
          0.0057224608464489, ...
          0.0057224608464489, ...
          0.0057224608464489, ...
          0.0057224608464489, ...
          0.0243387430144453, ...
          0.0243387430144453, ...
          0.0243387430144453, ...
          0.0243387430144453, ...
          0.0243387430144453, ...
          0.0243387430144453, ...
          0.0094129636631352, ...
          0.0094129636631352, ...
          0.0094129636631352, ...
          0.0094129636631352, ...
          0.0094129636631352, ...
          0.0094129636631352, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973, ...
          0.0180179774943973 ];

  return
end
