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

%*****************************************************************************80
%
%% rule02() returns the prism rule of precision 2.
%
%  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.1046424703769979, ...
          0.1046424703769979, ...
          0.7907150592460042 ];

  y = [ ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.1046424703769979, ...
          0.7907150592460042, ...
          0.1046424703769979 ];

  z = [ ...
          0.0784174655667168, ...
          0.9215825344332832, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000 ];

  w = [ ...
          0.2344355869392759, ...
          0.2344355869392759, ...
          0.1770429420404827, ...
          0.1770429420404827, ...
          0.1770429420404827 ];

  return
end
