function [ x, w ] = rule22 ( n )

%*****************************************************************************80
%
%% RULE22 returns the rule of degree 22.
%
%  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 = [ ...
    -.1168773459913643E-01,-.7371881387645758, ...
    0.8294952934036814,-.5954751704041336, ...
    -.4324369794733402,-.7688482950823662, ...
    0.9204074310294709,0.9345989584398445E-01, ...
    -.8936155650763420,-.7702459791051814, ...
    -.1373629144933700,0.5509811434354096, ...
    -.1491245367450688,0.3561825582103059, ...
    0.9353031268387029,-.2924575431987692, ...
    0.2443965863661181,-.6390847658587071, ...
    -.4984730279242101,0.7392293471332223, ...
    -.9874262069353944,-.9183316919543670E-01, ...
    -.7612182335622527,-.8617096626977842E-01, ...
    0.9888069308129792,-.5588987313328233, ...
    -.5751189401814027,-.9225108518720977, ...
    0.8984615209750768,0.8382620472105732, ...
    0.1626926025129410,-.9967788148796793, ...
    -.6486037112886791,-.5668454455159495, ...
    0.9856879280293260,0.9717573267273887, ...
    -.3076008058514624,0.3587016306051349, ...
    -.7623612106456181,0.6388680957517785, ...
    0.5510537420201546,0.1053488710493425, ...
    0.9916832391481870,-.8977327473577641, ...
    0.4016301282586624,-.9838441232429354, ...
    0.7905399896596540,-.9824504337674188, ...
    -.5775436902276508,-.9772275458992810, ...
    -.8927278831009643,0.6072501413880697, ...
    0.3391264841215570,0.8802736916527715, ...
    -.3614572700854332,0.7628120974888042, ...
    0.9410464685954009,0.5766667841609323, ...
    0.3785886954980848,-.7336046871225165, ...
    -.3595240670259577,0.1395498733753600, ...
    -.8379800610987231,0.9026858439122091, ...
    -.7544128178700894,-.1371254063139990, ...
    0.7326981395585584,0.1008288194176049, ...
    -.1402954353279801,0.5600957930752593, ...
    -.9835815408757524,0.9794922442499654, ...
    -.3422476201633468,0.8847947144492797, ...
    0.3480028949057162,0.1399751797907734, ...
    0.7410269267329871,-.8707213419949226, ...
    -.7829703967945006,-.7518531217472861E-01, ...
    0.1797607493737034,0.5514938721272684, ...
    0.9189774855743247,-.9478502721386363, ...
    -.3753442057328584,0.9824594434447735, ...
    0.7794560599617187,0.5868549502954560, ...
    -.9830132030284936,-.9109869789024120, ...
    -.3369368343786870,-.9656919342504539, ...
    0.9878086002165142 ];
  ys = [ ...
    0.2190948368619670,-.5638633812668349, ...
    0.7772605528528743,-.2566398183828403, ...
    -.5129047910078139,-.4506194723257167, ...
    0.8425861006849568,-.4518983245417754, ...
    0.3543337144777458,0.4959761932603439, ...
    0.2485911682035064,-.3132773446075675, ...
    -.9937282156984992,-.2003997888710157, ...
    -.5607980017506478,-.3522379616257777, ...
    -.4426431371959611,-.3692415241854752E-01, ...
    0.7496615691984209,0.6926590385285363, ...
    -.1850687765410226,-.1925693267588198, ...
    0.1363788459324560,0.9515651662120697, ...
    0.5579343853339161E-01,0.9517652105508706, ...
    -.9389370283909926,-.3771353916795439, ...
    -.9947202210423953,-.3609118075153294, ...
    0.9902936741983037,0.3133668776125615, ...
    0.6199365920821208,0.2873358944700919, ...
    -.7434073625585887,0.3666474918307532, ...
    0.8685050837394444,0.9342984101597417, ...
    -.8496275328566278,-.4918800631346358, ...
    0.5207829647449653,0.4875959314271490, ...
    -.3759522691536638,-.9452616179455003, ...
    -.6399489008638399,-.5698761741539897, ...
    -.6821182736060648,-.9838318115418717, ...
    -.7110797215818025,-.8424531888684956, ...
    -.7019404243765398,-.8133442851406898, ...
    0.6937136042433247,0.1403628667969644, ...
    0.4853142503301350,-.9404688641752270, ...
    -.1594253939471121,0.8410558281897980, ...
    -.9090435768164216,0.8618858293632953, ...
    -.9801201774367985,0.2925291147308246E-01, ...
    -.1389383474162093,-.8488076014783108, ...
    -.9950422147374585,0.6774278489603331, ...
    0.3281092020661301,0.8336091093259060, ...
    -.6447342914933101,-.9855619048067824, ...
    0.9863388067410731,-.9474857272173681, ...
    -.8291238758195407,0.5386555528488844, ...
    0.2895743833834052,-.7848534988754099, ...
    -.1043902046106473,0.7337865418484663, ...
    0.9901322140668845,-.9181369104835962, ...
    -.9807391493006852,0.7602577556121397E-01, ...
    0.9902833594797992,0.7639725935225382E-01, ...
    0.1089930212643242E-01,0.6870529955030933, ...
    0.9401212847078045,0.9891928053902059, ...
    0.8336461919417253,0.9356252744608189, ...
    0.9934890766781104,0.5866648232658751, ...
    0.9371299738758988 ];
  ws = [ ...
    0.6067121956035168E-02,0.2527104513859865E-01, ...
    0.9025528955311097E-02,0.5803636803454140E-01, ...
    0.4942739001800841E-01,0.2794072665175644E-01, ...
    0.1603496923754518E-01,0.6013880064040703E-01, ...
    0.2941264773858220E-01,0.3334592290253230E-01, ...
    0.7897021060987033E-01,0.3685303544908184E-01, ...
    0.3948104138816246E-02,0.6679001222692597E-01, ...
    0.2111954975158539E-01,0.4792141258829016E-01, ...
    0.2695976162319685E-01,0.2470945430647790E-01, ...
    0.3947338905928970E-01,0.3294627756714954E-01, ...
    0.9846011394782925E-02,0.7297001782497028E-01, ...
    0.4106989048022942E-01,0.2161795857158166E-01, ...
    0.8365413396512252E-02,0.1967362232030983E-01, ...
    0.2188213465301344E-01,0.2494392526364261E-01, ...
    0.3519731383753954E-02,0.3478325192787569E-01, ...
    0.8190571090769309E-02,0.6108434551087310E-02, ...
    0.3434968062753964E-01,0.6007998437323292E-01, ...
    0.7504666111448662E-02,0.1603184108436172E-01, ...
    0.3437516964723778E-01,0.2571624349884583E-01, ...
    0.2694235332130491E-01,0.4466450734173113E-01, ...
    0.5500707054662403E-01,0.7222938823304295E-01, ...
    0.7486350326225666E-02,0.1143517520249437E-01, ...
    0.5817171888321045E-01,0.9994978126228900E-02, ...
    0.3467709360229788E-01,0.1964349392895841E-02, ...
    0.4240321318174279E-01,0.8728495324106815E-02, ...
    0.2591557111759762E-01,0.3720861411904331E-01, ...
    0.5505688737445376E-01,0.3631603425342831E-01, ...
    0.6567401226660792E-01,0.1795583567053723E-01, ...
    0.2289367999547543E-01,0.3547488447682710E-01, ...
    0.2995254108777568E-01,0.2686044680493277E-01, ...
    0.1079041750322994E-01,0.7877736606773408E-01, ...
    0.3733692480386966E-01,0.1821095142444074E-01, ...
    0.5325368320113208E-02,0.5922160899036626E-01, ...
    0.5076619476679856E-01,0.4372734278286988E-01, ...
    0.6332661510009212E-01,0.9790273018996520E-02, ...
    0.1776555836345017E-02,0.4813300061774173E-02, ...
    0.4258882597057490E-01,0.3052111793035846E-01, ...
    0.7003826037949971E-01,0.5120830680793959E-01, ...
    0.4944440063240135E-01,0.2605683245528804E-01, ...
    0.6201489406026509E-02,0.3089929178556832E-01, ...
    0.1316878814412241E-01,0.6382065038385205E-01, ...
    0.3990900163624796E-02,0.2334151205865433E-01, ...
    0.7860422025755921E-01,0.1000548940130294E-01, ...
    0.1798134856368640E-01,0.8411973937140507E-02, ...
    0.7382035812019881E-02,0.1170576178999751E-01, ...
    0.6920800809156403E-02,0.1595811031270932E-01, ...
    0.3880611624295888E-02 ];

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

  return
end