function [ x, w ] = rule17 ( n )

%*****************************************************************************80
%
%% RULE17 returns the rule of degree 17.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    01 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.7710386602263628E+00, ...
    0.7710386602263630E+00, ...
    0.9803457456469387E+00, ...
   -0.9803457456469384E+00, ...
   -0.2292639639675523E+00, ...
    0.2292639639675524E+00, ...
    0.4847176019505991E-03, ...
   -0.4847176019504780E-03, ...
   -0.6189416389750175E+00, ...
    0.6189416389750177E+00, ...
    0.9587315519802511E+00, ...
   -0.9587315519802511E+00, ...
    0.8409306922533750E+00, ...
   -0.8409306922533748E+00, ...
   -0.4308042054877432E+00, ...
    0.4308042054877433E+00, ...
    0.4761431266211590E+00, ...
   -0.4761431266211589E+00, ...
    0.8651144531733139E+00, ...
   -0.8651144531733139E+00, ...
    0.9846617345267017E+00, ...
   -0.9846617345267017E+00, ...
   -0.7981639404863030E+00, ...
    0.7981639404863030E+00, ...
    0.6877591943414725E+00, ...
   -0.6877591943414725E+00, ...
   -0.3038305486106544E+00, ...
    0.3038305486106544E+00, ...
    0.9852576255116258E+00, ...
   -0.9852576255116258E+00, ...
    0.9853756930046446E+00, ...
   -0.9853756930046446E+00, ...
    0.7024672194580522E+00, ...
   -0.7024672194580522E+00, ...
    0.4589513024499020E+00, ...
   -0.4589513024499019E+00, ...
   -0.5838938372432102E+00, ...
    0.5838938372432102E+00, ...
    0.4855363777625971E+00, ...
   -0.4855363777625971E+00, ...
    0.1909552287968119E+00, ...
   -0.1909552287968118E+00, ...
    0.1970910744873101E+00, ...
   -0.1970910744873101E+00, ...
    0.9070140000742543E+00, ...
   -0.9070140000742543E+00, ...
   -0.9370706813548184E+00, ...
    0.9370706813548186E+00, ...
   -0.1024098809482286E+00, ...
    0.1024098809482287E+00, ...
    0.9018657853563646E+00, ...
   -0.9018657853563646E+00, ...
    0.7422255782894629E+00, ...
   -0.7422255782894629E+00, ...
   -0.1975779250586182E-19 ];
  ys = [ ...
   -0.9187170657318696E+00, ...
    0.9187170657318696E+00, ...
   -0.9679135253250817E+00, ...
    0.9679135253250819E+00, ...
   -0.9437800394025085E+00, ...
    0.9437800394025085E+00, ...
   -0.9886578344699537E+00, ...
    0.9886578344699537E+00, ...
   -0.9803491213417113E+00, ...
    0.9803491213417113E+00, ...
   -0.8226737868824753E+00, ...
    0.8226737868824755E+00, ...
   -0.9649601466712245E+00, ...
    0.9649601466712245E+00, ...
   -0.8370492275539414E+00, ...
    0.8370492275539414E+00, ...
   -0.9716943047473653E+00, ...
    0.9716943047473653E+00, ...
   -0.6326447362896030E+00, ...
    0.6326447362896030E+00, ...
    0.2029425559112923E+00, ...
   -0.2029425559112922E+00, ...
   -0.7906135688735062E+00, ...
    0.7906135688735062E+00, ...
   -0.8442560578129694E+00, ...
    0.8442560578129694E+00, ...
   -0.3117615836793495E+00, ...
    0.3117615836793495E+00, ...
    0.7701659795648228E+00, ...
   -0.7701659795648226E+00, ...
   -0.4379432170880169E+00, ...
    0.4379432170880170E+00, ...
   -0.3820619012323893E+00, ...
    0.3820619012323894E+00, ...
   -0.6514286057161101E+00, ...
    0.6514286057161101E+00, ...
   -0.5711068454496305E+00, ...
    0.5711068454496305E+00, ...
   -0.8072896746317025E-01, ...
    0.8072896746317031E-01, ...
   -0.8630149364726712E+00, ...
    0.8630149364726712E+00, ...
   -0.3872678175415290E+00, ...
    0.3872678175415290E+00, ...
    0.5103334842355030E+00, ...
   -0.5103334842355027E+00, ...
   -0.9584329986119476E+00, ...
    0.9584329986119474E+00, ...
   -0.6619201369182062E+00, ...
    0.6619201369182062E+00, ...
   -0.1238115372273944E+00, ...
    0.1238115372273945E+00, ...
    0.2071876599633523E+00, ...
   -0.2071876599633522E+00, ...
    0.5346688849930886E-20 ];
  ws = [ ...
    0.1261638293838951E-01, ...
    0.1261638293838951E-01, ...
    0.3408339905429266E-02, ...
    0.3408339905429266E-02, ...
    0.2796862081921473E-01, ...
    0.2796862081921473E-01, ...
    0.1252812914329644E-01, ...
    0.1252812914329644E-01, ...
    0.1635296523785200E-01, ...
    0.1635296523785200E-01, ...
    0.1720881227455075E-01, ...
    0.1720881227455075E-01, ...
    0.1523407270818440E-01, ...
    0.1523407270818440E-01, ...
    0.5600796522816800E-01, ...
    0.5600796522816800E-01, ...
    0.2382823797668716E-01, ...
    0.2382823797668716E-01, ...
    0.4513279974663867E-01, ...
    0.4513279974663867E-01, ...
    0.1931215256841166E-01, ...
    0.1931215256841166E-01, ...
    0.4158804216001467E-01, ...
    0.4158804216001467E-01, ...
    0.4685849665862760E-01, ...
    0.4685849665862760E-01, ...
    0.1200522449400290E+00, ...
    0.1200522449400290E+00, ...
    0.1238565802221201E-01, ...
    0.1238565802221201E-01, ...
    0.1760077392303538E-01, ...
    0.1760077392303538E-01, ...
    0.8264937698824523E-01, ...
    0.8264937698824523E-01, ...
    0.8629133710270168E-01, ...
    0.8629133710270168E-01, ...
    0.8660536182880048E-01, ...
    0.8660536182880048E-01, ...
    0.1134857467272575E+00, ...
    0.1134857467272575E+00, ...
    0.6518861145910534E-01, ...
    0.6518861145910534E-01, ...
    0.1184802238173896E+00, ...
    0.1184802238173896E+00, ...
    0.4767526390300979E-01, ...
    0.4767526390300979E-01, ...
    0.1203076112968188E-01, ...
    0.1203076112968188E-01, ...
    0.1010849820160845E+00, ...
    0.1010849820160845E+00, ...
    0.5753445241741756E-01, ...
    0.5753445241741756E-01, ...
    0.8946701652955226E-01, ...
    0.8946701652955226E-01, ...
    0.1312734684062163E+00 ];

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

  return
end