function [ x, w ] = rule30 ( n )

%*****************************************************************************80
%
%% RULE30 returns the rule of degree 30.
%
%  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 = [ ...
    -.2489884108477549,-.8955668996881347, ...
    -.9323001501704753,0.7405445449992548, ...
    -.9340642229281805,-.9095962664223526, ...
    0.5608633663495270,0.8616511147917938, ...
    0.1660321315312064,0.6574874238191415, ...
    -.1433381379425067,0.1329569336990351, ...
    -.8829748195890315,0.6632673829575200, ...
    0.4936163200514849,-.2027212042708638, ...
    -.9958809661720823,-.3073287548883581, ...
    -.8217303027626981,0.8261783389660409, ...
    -.4397988250817157,0.5010528086431736, ...
    0.5909729749119785,-.3540551267912417, ...
    -.1341504650225714,0.8797782958287345, ...
    0.7856276574168712,0.2511140307013671E-01, ...
    0.6793669279007186,0.5990617334262452, ...
    -.6571411220532614E-01,0.2486338305340984, ...
    0.2517441361617084,0.4956264496869945, ...
    0.6407808309272243,0.3783356039497430, ...
    0.4110110511714637,-.8395840683102380, ...
    -.8086877648916926,0.1348481347528898, ...
    0.7911211318084024E-01,0.1744159174802842, ...
    0.3212567387892802E-01,-.9336794010864112E-02, ...
    0.7322797884447179,0.3357167967967313E-01, ...
    0.5935826720491633,0.8968431432339444, ...
    0.1799598313156058,0.7269821230572000, ...
    -.1856842034490502,0.6913593560408486, ...
    -.4397815672742683,-.7758135419229234, ...
    -.9616538724444206,0.3193596929830660, ...
    0.3777165903330749,-.7679662364686681, ...
    -.7298701218806570,0.4065079920371972, ...
    -.9227465688784468E-01,-.5950684639841661, ...
    -.9013518967720980,0.8836909793143869, ...
    -.9967771339953647,-.9944392441466685, ...
    -.2195956599465894,-.4351118739522196, ...
    -.4349934895265168,0.8129226389660974, ...
    0.9133061964092235,-.7096773902564911, ...
    -.7019587221008244E-01,0.3087832511180271, ...
    -.4541723274189980,0.1380191907138354, ...
    0.9551957279557286,-.7407772548705425, ...
    -.6078105587102869,-.8435179784664049, ...
    0.5490559994565902,0.2444037338918357, ...
    0.2400810439649010,-.5106820540745040E-01, ...
    0.5284630091276127,0.8294520284860720, ...
    0.9644131173686892,0.5513347774529967, ...
    -.7997415011464921,0.9063983320825396E-01, ...
    0.5014531965594803,-.3847230717105717, ...
    -.2781131563704615,-.9344492367354887, ...
    -.9030917852729532,-.4172241922741589E-01, ...
    -.2640772153341865,0.9665539194330073, ...
    -.2367623099741220,-.8626350293444497, ...
    -.5924624188363723,-.2560781746707642, ...
    -.9697346473592514,-.5129714977732606, ...
    0.9006954577534996,0.4485570029784398, ...
    -.9929762013100525,-.4556636018911340, ...
    -.6294980126555781,-.3125079163601901, ...
    -.7343713176297997,-.6080741370996756, ...
    0.7969083548584857,0.9691866547839980, ...
    0.3151361183804022,0.3344055950815164, ...
    0.9472309841785602,-.1247403647674209, ...
    -.9779732163470612,-.7256364179379601, ...
    0.9970921358526692,-.9954560187756241, ...
    0.9951087682452733,-.6883166208655062, ...
    0.4290000273640588,-.9880739319478465, ...
    0.9072764372199305,0.9928546893888752, ...
    -.9917918025218534,-.4805464361132344, ...
    -.8469642292616028,-.8369560183233818, ...
    -.9779640479084950,0.9687313192733549, ...
    -.7547772532654357,0.7252641746474808, ...
    0.6646022965583286,-.5644091993909820, ...
    0.8026432404348592,0.9543957566085060, ...
    -.3557861147500951,0.9951864328005721, ...
    -.9294765518337259,-.9726603739446762, ...
    0.9908893344007184,0.9593076671548199, ...
    -.9203911103942219,-.5020036235062807, ...
    0.8473616010099635,0.7880730531161636, ...
    0.1506248287699496,0.9937769310041399, ...
    0.9894968458978942,0.5755438442317007, ...
    0.9058856705910572,0.9189816123793266, ...
    0.6951883785315084,-.6234868878005112, ...
    -.9575663408305919,-.9618986262036308, ...
    0.8232277101227666,0.9715176930569319, ...
    -.6414127133627360,-.9547454138171275, ...
    -.9923199594879274,-.8900231674458331, ...
    0.9908836025186869 ];
  ys = [ ...
    -.2460485077113066,-.4965476117162992, ...
    -.6487707118457230,0.3697665250429530, ...
    -.2243181000931358,-.1272532317878749, ...
    0.6675821699023886E-01,-.3572065887354983, ...
    -.5859511801028319,0.2705477662356954, ...
    -.1384585540894461,-.4984429846834076, ...
    -.6385136736297631,-.9972347998858430, ...
    0.9914800246598282,0.7647568592516673, ...
    0.5617037705569573,0.7101121364821149, ...
    -.9361722473508081,0.4495309095930795, ...
    0.9980930920696178,0.1901925696164289, ...
    0.9914568702475882,-.3600355152827119, ...
    0.5732016635520147,-.4984298059079483, ...
    -.2335476149195165,0.6688792604932079, ...
    -.5195288082893980E-01,-.2801670391820981, ...
    0.8352476010432909,-.7081859480565704, ...
    -.8979072023199524,-.4437687184357049, ...
    -.5837384948634179,0.3614240616611519, ...
    -.8230684981188165,0.3172654777326074E-01, ...
    -.9623528941703298,0.7321217620214555, ...
    -.8096610148202545,-.1586165019412888, ...
    0.2323785604104418E-01,-.3309606689238450, ...
    -.4388893082509347,0.4126373875717694, ...
    0.7615965342755699,0.2500590258181676, ...
    0.2336722577585314,0.8396217552527814, ...
    -.5038771822936119,0.5974085228316085, ...
    0.9608827453877556,0.9958546191278792, ...
    -.4499429575894099,0.5431833943398334E-01, ...
    -.5768346162092601,0.9424496317962137, ...
    0.2149562696494443,-.9626198942478345, ...
    -.9006091929700322,0.3935553572852833, ...
    -.9903441091784717,-.9730346543555619E-01, ...
    0.2076974492755955,-.6015458100234288, ...
    -.7914402846211577,-.9950700583024972, ...
    0.5506915379662010,0.6946004094913842, ...
    0.5611276703738952,-.9902901583614324, ...
    -.9923523090719414,-.3380059761467528, ...
    0.2166811227803833,0.9084360793204729, ...
    -.6099079065118447,-.1613429998348757, ...
    0.2829088743783339E-01,-.3475035436069812, ...
    0.4843880673732963,-.9945285505783277, ...
    0.5463996157581324,0.9658858240647616, ...
    -.7106923954489180,0.9126926988703539, ...
    0.9995360204936274,-.9899747511065149, ...
    -.7645030064887491,-.9580271636184000, ...
    0.8948233603717312,-.8974768652542269, ...
    0.3866240780739671,0.7812537795763034, ...
    -.8567508357551102,-.6608100052801699, ...
    0.9104312794921889,0.3794498701460580, ...
    0.9917517335327534,0.8711471531031385, ...
    0.6865345494324926,-.9676402895588128, ...
    -.7614862881147397,-.7974426670548660, ...
    0.8007048860105550,-.1342520685119810, ...
    -.2726893919561137,0.8259904245622020, ...
    -.3535762642754187,0.2570082752527717E-01, ...
    0.5408483080025682,0.9034516527900712, ...
    0.1094396192245524,-.9898880600690686, ...
    0.8171118504095591,0.9624825870234074, ...
    -.3058427697709690,0.2042047511467314, ...
    0.6881014856247000,0.8038659949683351, ...
    -.9483358470837810,-.8774593970142823, ...
    0.8159614789170281,-.8758831247154076, ...
    0.6649096212014286,-.9861910838287823, ...
    0.9701981255999362,-.7285580220078556, ...
    0.9697520026151714,-.1654759673552738, ...
    0.3730458721291450,0.6880375541948958, ...
    -.1463794215119850E-01,0.6931515112743655, ...
    -.5310794389210227,-.9586758167636964, ...
    0.9527988373282164,-.9549818827769936, ...
    -.6636898088045536,0.4709151069275523E-01, ...
    -.6618488641031038,0.5367182637758624, ...
    0.1898490002080080,0.3931950072226694, ...
    0.9627353314786278,0.8959541550605267, ...
    0.5524608659159009,-.5236758593851664, ...
    -.9898656273130529,0.9909061133703810, ...
    0.9951465511067116,0.1849675400643637, ...
    -.1455654267961535,-.9037901015984503, ...
    -.7708757339972588,-.9444760769791583, ...
    -.7980610860639374,0.9837596096190924, ...
    -.9414770920443709,0.9976903799315803, ...
    -.8814229711931103,-.8637004475570209, ...
    -.6773031038124658,0.9224881482845090, ...
    0.8455113672684367,0.9760969611534657, ...
    -.4540561623942587 ];
  ws = [ ...
    0.1656982041847443E-01,0.6241957476859499E-02, ...
    0.5216414751791839E-02,0.1560407651121931E-01, ...
    0.9922352722380101E-02,0.1044885486074365E-01, ...
    0.1879260280925844E-01,0.7828025997082013E-02, ...
    0.6646815879562722E-02,0.2535391408286021E-01, ...
    0.3596968831636211E-01,0.3381660954529117E-01, ...
    0.1200214214883407E-01,0.1160844683478245E-02, ...
    0.3455740863097736E-02,0.1153404181974989E-01, ...
    0.2326794602666712E-02,0.2497552316469688E-01, ...
    0.6829794315843321E-02,0.1834140231596609E-01, ...
    0.1335225445575319E-02,0.2522798332446686E-01, ...
    0.1595934032110033E-02,0.3325015027182070E-01, ...
    0.3467011496498743E-01,0.1611839351364714E-01, ...
    0.2222188812186740E-01,0.1902350040458492E-01, ...
    0.2953427938744245E-01,0.2950256499869300E-01, ...
    0.2375703035217899E-01,0.2641584105673240E-01, ...
    0.1690793382324671E-01,0.2648926396425241E-01, ...
    0.2312689012710705E-01,0.3659471133442508E-01, ...
    0.2037361988036312E-01,0.2428599858933432E-01, ...
    0.2744225331234096E-02,0.2314679166528731E-01, ...
    0.2431857706237597E-01,0.3987956826883379E-01, ...
    0.4134270745058791E-01,0.4048978066628536E-01, ...
    0.2251078653857245E-01,0.4125065697406070E-01, ...
    0.2175419992100145E-01,0.1864439716615348E-01, ...
    0.3968876145073878E-01,0.1521710713143089E-01, ...
    0.3736662827386808E-01,0.2360382881992710E-01, ...
    0.9970157722257745E-02,0.1786030245435301E-02, ...
    0.1077371157065800E-01,0.3789581847120879E-01, ...
    0.2650233252873021E-01,0.8678377005773784E-02, ...
    0.3088113765197352E-01,0.1042906365431807E-01, ...
    0.1836452487305106E-01,0.3403335573613761E-01, ...
    0.2495937103585967E-02,0.1987508148017507E-01, ...
    0.3001373057974097E-02,0.3414083443427366E-02, ...
    0.2598635525971543E-01,0.3548865418196895E-02, ...
    0.3429487078025957E-01,0.1785504393755270E-01, ...
    0.1456023929593576E-01,0.3984363472067331E-02, ...
    0.4363711971919699E-02,0.3712059926790805E-01, ...
    0.3986478887569449E-01,0.1913617153849744E-01, ...
    0.1049511173281814E-01,0.3060958199220223E-01, ...
    0.3647607908842043E-01,0.2174227606463140E-01, ...
    0.3117137400117779E-01,0.3796109966676785E-02, ...
    0.3772008807242438E-01,0.1190095135082278E-01, ...
    0.2275866415131214E-01,0.9507317753716060E-02, ...
    0.6602435439732473E-03,0.3562338138346624E-02, ...
    0.1790794872114957E-01,0.1166720090620105E-01, ...
    0.1835513327961018E-01,0.1782419810205321E-01, ...
    0.4039879332467389E-01,0.8544698960003014E-02, ...
    0.1019822565974266E-01,0.3318239678979050E-01, ...
    0.1843639498443942E-01,0.1049436999441544E-01, ...
    0.4401594721967702E-02,0.1035186584479928E-01, ...
    0.2774663878371582E-01,0.1038891259079699E-01, ...
    0.7200083574761216E-02,0.2284618397210542E-01, ...
    0.1143761979472999E-01,0.3626034532564225E-01, ...
    0.4552809166608951E-02,0.2292163519800657E-01, ...
    0.3339012139070554E-01,0.4305115781657949E-01, ...
    0.2689701371924873E-01,0.1397250038349306E-01, ...
    0.2657597849484922E-01,0.1419885923832320E-02, ...
    0.2482810620945660E-01,0.1189134969439302E-01, ...
    0.1376786292971261E-01,0.4412810694947523E-01, ...
    0.5396384182228113E-02,0.1824530377035380E-01, ...
    0.1045375639904588E-02,0.1889471014408118E-02, ...
    0.2161857112903824E-02,0.1668110451401195E-01, ...
    0.3023692617299402E-01,0.9232726779228300E-03, ...
    0.4418205190510442E-02,0.3242974435474479E-02, ...
    0.1103547225797253E-02,0.3921202767387279E-01, ...
    0.2351260224707112E-01,0.1749878242380525E-01, ...
    0.9478556031843440E-02,0.7823816828409005E-02, ...
    0.2512073023506692E-01,0.8748252477568070E-02, ...
    0.1020629440191134E-01,0.1142386634483088E-01, ...
    0.2036353481009834E-01,0.1287466988683176E-01, ...
    0.3056687396551737E-01,0.3145655833062538E-02, ...
    0.1700461827659660E-01,0.9197009770615088E-02, ...
    0.1441218157540074E-02,0.5481672105012487E-02, ...
    0.1455840676178983E-01,0.3167421637373095E-01, ...
    0.3035466841344861E-02,0.3337345728148663E-02, ...
    0.4142211764571325E-02,0.4237586226174837E-02, ...
    0.5970530714448440E-02,0.1594194686963999E-01, ...
    0.1264147552673667E-01,0.5857851156194439E-02, ...
    0.1967714628271757E-01,0.5157040758112765E-02, ...
    0.4236825269003221E-02,0.7120803451144430E-03, ...
    0.1238091173770127E-01,0.5529561908151683E-02, ...
    0.2467962146273505E-01,0.4839010235595776E-02, ...
    0.2559138088025228E-02,0.4161994856862944E-02, ...
    0.4970131407881912E-02 ];

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

  return
end
