function [ x, w ] = rule09 ( n )

%*****************************************************************************80
%
%% RULE09 returns the rule of degree 9.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    07 July 2014
%
%  Author:
%
%    Original FORTRAN77 version by Hong Xiao, Zydrunas Gimbutas.
%    This MATLAB version by John Burkardt.
%
%  Reference:
%
%    Hong Xiao, Zydrunas Gimbutas,
%    A numerical algorithm for the construction of efficient quadrature
%    rules in two and higher dimensions,
%    Computers and Mathematics with Applications,
%    Volume 59, 2010, pages 663-676.
%
%  Parameters:
%
%    Input, integer N, the number of nodes.
%
%    Output, real X(2,N), the coordinates of the nodes.
%
%    Output, real W(N), the weights.
%
  xs = [ ...
    0.7502770999789001,-.7502770999789001, ...
    -.9279616459595694,0.9279616459595694, ...
    0.6306801197316682,-.6306801197316682, ...
    0.9688499663619775,-.9688499663619775, ...
    -.7620832819261721E-01,0.7620832819261719E-01, ...
    0.8526157293336627,-.8526157293336627, ...
    0.4533398211356476,-.5237358202144297, ...
    0.5237358202144297,-.4533398211356476, ...
    -.7154960467453349D-17 ];
  ys = [ ...
    -.9279616459595700,0.9279616459595700, ...
    -.7502770999789009,0.7502770999789010, ...
    0.9688499663619778,-.9688499663619778, ...
    -.6306801197316696,0.6306801197316697, ...
    0.8526157293336619,-.8526157293336618, ...
    0.7620832819261708E-01,-.7620832819261709E-01, ...
    0.5237358202144290,0.4533398211356468, ...
    -.4533398211356468,-.5237358202144290, ...
    -.1536427274631298D-17 ];
  ws = [ ...
    0.7926638883415150E-01,0.7926638883415155E-01, ...
    0.7926638883415171E-01,0.7926638883415174E-01, ...
    0.6284721101179108E-01,0.6284721101179105E-01, ...
    0.6284721101179126E-01,0.6284721101179125E-01, ...
    0.1902480253324007,0.1902480253324007, ...
    0.1902480253324001,0.1902480253324001, ...
    0.2816282136297291,0.2816282136297291, ...
    0.2816282136297291,0.2816282136297291, ...
    0.3724677695139016 ];

  x(1,1:n) = xs(1:n);
  x(2,1:n) = ys(1:n);
  w(1:n) = ws(1:n);

  return
end