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

%*****************************************************************************80
%
%% rule04() returns the pyramid quadrature rule of precision 4.
%
%  Discussion:
%
%    The unit pyramid with square base is the region
%
%      -1 <= X <= 1
%      -1 <= Y <= 1
%       0 <= Z <= 1.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 April 2023
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Jan Jaskowiec, Natarajan Sukumar,
%    High order symmetric cubature rules for tetrahedra and pyramids,
%    International Journal for Numerical Methods in Engineering,
%    Volume 122, Number 1, pages 148-171, 24 August 2020.
%
%  Output:
%
%    x(n), y(n), z(n): the coordinates of quadrature points.
%
%    w(n): the quadrature weights.
%
  x = [ ...
      0.00000000000000000000, ...
      0.00000000000000000000, ...
      0.65058155639823256333, ...
      0.00000000000000000000, ...
     -0.65058155639823256333, ...
      0.00000000000000000000, ...
      0.65796699712169004481, ...
     -0.65796699712169004481, ...
      0.65796699712169004481, ...
     -0.65796699712169004481 ];

  y = [ ...
      0.00000000000000000000, ...
      0.00000000000000000000, ...
      0.00000000000000000000, ...
      0.65058155639823256333, ...
      0.00000000000000000000, ...
     -0.65058155639823256333, ...
      0.65796699712169004481, ...
      0.65796699712169004481, ...
     -0.65796699712169004481, ...
     -0.65796699712169004481 ];

  z = [ ...
      0.12513695310874645150, ...
      0.67723278888613736015, ...
      0.32238414957821365237, ...
      0.32238414957821365237, ...
      0.32238414957821365237, ...
      0.32238414957821365237, ...
      0.03924828389881535040, ...
      0.03924828389881535040, ...
      0.03924828389881535040, ...
      0.03924828389881535040 ];

  w = [ ...
      0.20688340258955226214, ...
      0.11374188317064193310, ...
      0.10632458788932550031, ...
      0.10632458788932550031, ...
      0.10632458788932550031, ...
      0.10632458788932550031, ...
      0.06351909067062594394, ...
      0.06351909067062594394, ...
      0.06351909067062594394, ...
      0.06351909067062594394 ];

  return
end
