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:
%
%    27 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:
%
%    real x(n), y(n), z(n): the coordinates of quadrature points.
%
%    real w(n): the quadrature weights, which sum to 1.
%
  x = [ ...
          0.3333333333333334, ...
          0.3333333333333334, ...
          0.3333333333333334, ...
          0.4994650351706859, ...
          0.0010699296586282, ...
          0.4994650351706859, ...
          0.4450675000425037, ...
          0.1098649999149927, ...
          0.4450675000425037, ...
          0.4450675000425037, ...
          0.1098649999149927, ...
          0.4450675000425037, ...
          0.2111544337105105, ...
          0.5776911325789790, ...
          0.2111544337105105, ...
          0.2111544337105105, ...
          0.5776911325789790, ...
          0.2111544337105105, ...
          0.0438424814414928, ...
          0.9123150371170143, ...
          0.0438424814414928, ...
          0.0438424814414928, ...
          0.9123150371170143, ...
          0.0438424814414928, ...
          0.4827499316708669, ...
          0.0345001366582662, ...
          0.4827499316708669, ...
          0.4827499316708669, ...
          0.0345001366582662, ...
          0.4827499316708669, ...
          0.1771782441116773, ...
          0.6456435117766455, ...
          0.1771782441116773, ...
          0.1771782441116773, ...
          0.6456435117766455, ...
          0.1771782441116773, ...
          0.0462311804109438, ...
          0.9075376391781124, ...
          0.0462311804109438, ...
          0.0462311804109438, ...
          0.9075376391781124, ...
          0.0462311804109438, ...
          0.0593670097433656, ...
          0.7246952695529995, ...
          0.2159377207036349, ...
          0.7246952695529995, ...
          0.2159377207036349, ...
          0.0593670097433656, ...
          0.2241275457533561, ...
          0.7484054595660388, ...
          0.0274669946806053, ...
          0.7484054595660388, ...
          0.0274669946806053, ...
          0.2241275457533561, ...
          0.2241275457533561, ...
          0.7484054595660388, ...
          0.0274669946806053, ...
          0.7484054595660388, ...
          0.0274669946806053, ...
          0.2241275457533561 ];

  y = [ ...
          0.3333333333333334, ...
          0.3333333333333334, ...
          0.3333333333333334, ...
          0.0010699296586282, ...
          0.4994650351706859, ...
          0.4994650351706859, ...
          0.1098649999149927, ...
          0.4450675000425037, ...
          0.4450675000425037, ...
          0.1098649999149927, ...
          0.4450675000425037, ...
          0.4450675000425037, ...
          0.5776911325789790, ...
          0.2111544337105105, ...
          0.2111544337105105, ...
          0.5776911325789790, ...
          0.2111544337105105, ...
          0.2111544337105105, ...
          0.9123150371170143, ...
          0.0438424814414928, ...
          0.0438424814414928, ...
          0.9123150371170143, ...
          0.0438424814414928, ...
          0.0438424814414928, ...
          0.0345001366582662, ...
          0.4827499316708669, ...
          0.4827499316708669, ...
          0.0345001366582662, ...
          0.4827499316708669, ...
          0.4827499316708669, ...
          0.6456435117766455, ...
          0.1771782441116773, ...
          0.1771782441116773, ...
          0.6456435117766455, ...
          0.1771782441116773, ...
          0.1771782441116773, ...
          0.9075376391781124, ...
          0.0462311804109438, ...
          0.0462311804109438, ...
          0.9075376391781124, ...
          0.0462311804109438, ...
          0.0462311804109438, ...
          0.7246952695529995, ...
          0.0593670097433656, ...
          0.7246952695529995, ...
          0.2159377207036349, ...
          0.0593670097433656, ...
          0.2159377207036349, ...
          0.7484054595660388, ...
          0.2241275457533561, ...
          0.7484054595660388, ...
          0.0274669946806053, ...
          0.2241275457533561, ...
          0.0274669946806053, ...
          0.7484054595660388, ...
          0.2241275457533561, ...
          0.7484054595660388, ...
          0.0274669946806053, ...
          0.2241275457533561, ...
          0.0274669946806053 ];

  z = [ ...
          0.5000000000000000, ...
          0.0620804206000612, ...
          0.9379195793999389, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.2351832223969616, ...
          0.2351832223969616, ...
          0.2351832223969616, ...
          0.7648167776030383, ...
          0.7648167776030383, ...
          0.7648167776030383, ...
          0.3380115589156150, ...
          0.3380115589156150, ...
          0.3380115589156150, ...
          0.6619884410843850, ...
          0.6619884410843850, ...
          0.6619884410843850, ...
          0.2991741657146056, ...
          0.2991741657146056, ...
          0.2991741657146056, ...
          0.7008258342853944, ...
          0.7008258342853944, ...
          0.7008258342853944, ...
          0.0161039372678948, ...
          0.0161039372678948, ...
          0.0161039372678948, ...
          0.9838960627321052, ...
          0.9838960627321052, ...
          0.9838960627321052, ...
          0.0546091297715147, ...
          0.0546091297715147, ...
          0.0546091297715147, ...
          0.9453908702284853, ...
          0.9453908702284853, ...
          0.9453908702284853, ...
          0.0211468980535365, ...
          0.0211468980535365, ...
          0.0211468980535365, ...
          0.9788531019464635, ...
          0.9788531019464635, ...
          0.9788531019464635, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.1523897230641826, ...
          0.1523897230641826, ...
          0.1523897230641826, ...
          0.1523897230641826, ...
          0.1523897230641826, ...
          0.1523897230641826, ...
          0.8476102769358174, ...
          0.8476102769358174, ...
          0.8476102769358174, ...
          0.8476102769358174, ...
          0.8476102769358174, ...
          0.8476102769358174 ];

  w = [ ...
          0.0477869971115503, ...
          0.0265242298973318, ...
          0.0265242298973318, ...
          0.0123656013604738, ...
          0.0123656013604738, ...
          0.0123656013604738, ...
          0.0377019831531896, ...
          0.0377019831531896, ...
          0.0377019831531896, ...
          0.0377019831531896, ...
          0.0377019831531896, ...
          0.0377019831531896, ...
          0.0233456174363846, ...
          0.0233456174363846, ...
          0.0233456174363846, ...
          0.0233456174363846, ...
          0.0233456174363846, ...
          0.0233456174363846, ...
          0.0095970715963016, ...
          0.0095970715963016, ...
          0.0095970715963016, ...
          0.0095970715963016, ...
          0.0095970715963016, ...
          0.0095970715963016, ...
          0.0066321078005801, ...
          0.0066321078005801, ...
          0.0066321078005801, ...
          0.0066321078005801, ...
          0.0066321078005801, ...
          0.0066321078005801, ...
          0.0166799856433621, ...
          0.0166799856433621, ...
          0.0166799856433621, ...
          0.0166799856433621, ...
          0.0166799856433621, ...
          0.0166799856433621, ...
          0.0030327934591018, ...
          0.0030327934591018, ...
          0.0030327934591018, ...
          0.0030327934591018, ...
          0.0030327934591018, ...
          0.0030327934591018, ...
          0.0219227903282098, ...
          0.0219227903282098, ...
          0.0219227903282098, ...
          0.0219227903282098, ...
          0.0219227903282098, ...
          0.0219227903282098, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656, ...
          0.0123828035424656 ];

  return
end
