function p = points_cube(d,n)

% This function returns a set of interpolation points for total degree
% interpolation of degree n in the unit cube [-1,1]^d. The cardinality of
% the set of points is N, the dimension of the space of polynomials in d
% variables with total degree less than or equal to n.

% The set of points is given in the format of one vector of length N times
% d, with the first d entries of the vector containing the d coordinates of
% the first point, and so on.

% The set is unisolvent, and has a very low Lebesgue constant.

% Sets are available for the following choices:
% d=1: n=1,...,10
% d=2: n=1,...,10
% d=3: n=1,...,5
% d=4: n=1,...,4
% d=5,6,7,8: n=1,2
% d=9,10: n=1


% Inputs: dimension d, degree n.
% Outputs: interpolation points p.

%==============

if d > 10
    error('Dimension d must be between 1 and 10')
end

switch d
    
    case 1
        
        if n > 10
            error('Degree n must be between 1 and 10 for d=1')
        end
        
        switch n
            
            case 1
                p=[
                    1.000000000000000
                    -1.000000000000000
                    ];
            case 2
                p=[
                    -0.023383813596620
                    -0.992441398019719
                    0.945673117039994
                    ];
            case 3
                p=[
                    -0.781691575915083
                    0.651617715711197
                    -0.323804562395656
                    -0.412053893947032
                    ];
            case 4
                p=[
                    -0.014564936376733
                    0.596644973764727
                    0.969798249311328
                    -0.998925714921146
                    -0.625774374254749
                    ];
            case 5
                p=[
                    0.977859447269620
                    -0.998902808434292
                    -0.736123315790335
                    -0.276303439615268
                    0.715071623700223
                    0.255248781813720
                    ];
                
            case 6
                p=[
                    0.434889757674648
                    -0.999825317861145
                    -0.804808116902622
                    0.789407575724383
                    -0.007711858422490
                    0.984421363496304
                    -0.450311375918310
                    ];
                
            case 7
                p=[
                    -0.568853284561033
                    0.987117877921316
                    -0.998267747945366
                    0.192255086269607
                    -0.203382210643441
                    0.557723808120791
                    0.837090375187428
                    -0.848246611845404
                    ];
                
            case 8
                p=[
                    -0.344143452715778
                    -0.871006557660854
                    0.000000000000001
                    0.871006557660856
                    0.989513302877687
                    -0.646683137239421
                    0.646683137239423
                    0.344143452715779
                    -0.989513302877685
                    ];
                
            case 9
                p=[
                    0.990973436935868
                    -0.997140077983230
                    -0.900486856187263
                    -0.715438540361907
                    0.154572157675433
                    -0.160709252774476
                    0.454340550980713
                    0.894330681078115
                    0.709274517745046
                    -0.460472090179410
                    ];
                
            case 10
                p=[
                    0.918537179874920
                    -0.919030205350688
                    0.998967283620721
                    -0.763763544800011
                    -0.546486953588584
                    -0.999450282716363
                    -0.284912228474536
                    -0.000230332813861
                    0.284434952357882
                    0.763262027875399
                    0.546000274589981
                    ];
                
        end
        
    case 2
        
        if n > 10
            error('Degree n must be between 1 and 10 for d=2')
        end
        
        switch n
            
            case 1
                p=[
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.236067977499790
                    -0.236067977499789
                    1.000000000000000
                    ];
                
            case 2
                p=[
                    -1.000000000000000
                    -0.701077715398357
                    0.044899686442300
                    -1.000000000000000
                    0.678844322845373
                    0.009013439265519
                    0.792508037454913
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.783472181392356
                    0.839571567756080
                    ];
            case 3
                p=[
                    -0.905875073101773
                    -1.000000000000000
                    1.000000000000000
                    0.852972633658497
                    1.000000000000000
                    -0.852546640285713
                    0.272420650225527
                    1.000000000000000
                    -0.499401671103162
                    0.589630729486096
                    0.280228665972653
                    -1.000000000000000
                    0.778913958410996
                    0.001180175968463
                    -1.000000000000000
                    -0.001969259885266
                    -0.492515871896207
                    -0.593789511862561
                    -0.907919098828255
                    1.000000000000000
                    ];
            case 4
                p=[
                    0.866492766612784
                    -0.344591377096529
                    0.020638914421420
                    -0.746848462032249
                    0.917977420300992
                    1.000000000000000
                    -0.080851520415988
                    1.000000000000000
                    0.151075929151834
                    0.077665454137443
                    -0.629731200921567
                    0.669638675317036
                    -0.501858251977857
                    -1.000000000000000
                    0.593842796091328
                    0.804318369737515
                    -0.859368605543231
                    -0.352139717148569
                    1.000000000000000
                    0.424963189253067
                    -1.000000000000000
                    -0.905089842222673
                    -1.000000000000000
                    0.422170588094603
                    0.513899776705276
                    -1.000000000000000
                    1.000000000000000
                    -0.905940117191914
                    -0.915128563767496
                    1.000000000000000
                    ];
            case 5
                p=[
                    -0.584948374645069
                    -1.000000000000000
                    -0.568766870682044
                    0.912927089395538
                    -1.000000000000000
                    -0.945421044860574
                    -0.935140783137495
                    1.000000000000000
                    0.795346404221819
                    0.243264090364250
                    0.558542254777678
                    0.914115647428661
                    -0.857204383330359
                    -0.728767735662776
                    1.000000000000000
                    -0.154430331882160
                    -0.368918321416503
                    -0.390086547324136
                    -0.041450556042665
                    1.000000000000000
                    0.577233275645370
                    -1.000000000000000
                    1.000000000000000
                    0.630723521851812
                    -1.000000000000000
                    0.589445242386735
                    0.935152737787516
                    1.000000000000000
                    -0.013945397142848
                    0.500652112865287
                    0.016003490208194
                    -0.906033833470365
                    0.356034276373762
                    -0.377948149985001
                    -1.000000000000000
                    -0.218316326491516
                    1.000000000000000
                    -0.949722418923033
                    0.880195216042509
                    -0.704288232884750
                    -0.809140609340711
                    0.205114199812322
                    ];
            case 6
                p=[
                    0.662445266243466
                    0.934995821904289
                    0.890219700659086
                    0.459515283322806
                    0.539690699987429
                    0.090956757880523
                    0.312898927895050
                    -1.000000000000000
                    -0.687910166870386
                    -1.000000000000000
                    0.953136501310015
                    -1.000000000000000
                    -0.203928080592039
                    -0.929661687149289
                    -0.894542372471104
                    0.751630510673329
                    -0.046543080980456
                    -0.081140134735048
                    -0.327107782239236
                    0.932834819368072
                    0.192058774044817
                    1.000000000000000
                    0.917537271427266
                    -0.371982455559525
                    0.716375328907479
                    -0.930646673158122
                    0.332143974151592
                    -0.609663776835647
                    1.000000000000000
                    -0.698044129521704
                    -1.000000000000000
                    0.370280152236499
                    1.000000000000000
                    0.775690995159884
                    -0.755893450838520
                    1.000000000000000
                    -0.823047652375780
                    -0.819324071122775
                    0.949329798031690
                    1.000000000000000
                    -0.926031073969552
                    -0.065340861508884
                    -1.000000000000000
                    -0.528330447628046
                    -1.000000000000000
                    0.948958634099098
                    1.000000000000000
                    0.115650862019993
                    0.191898030300572
                    0.612437371952052
                    -0.501873776582857
                    -0.482290972098263
                    -0.529554811078929
                    0.365712286405860
                    -0.987027171142402
                    -0.956124020581549
                    ];
            case 7
                p=[
                    1.000000000000000
                    0.998687419092138
                    -0.961982828393957
                    -1.000000000000000
                    -0.351800895955908
                    0.194504703627548
                    0.047052343506326
                    -0.336916329454534
                    -1.000000000000000
                    -0.246592457126651
                    0.096472918449146
                    -0.956661758084456
                    -0.732373876719257
                    -0.940173059386881
                    0.317645246380648
                    0.312786939905177
                    0.942854050402363
                    0.869388922924884
                    -0.958244465371701
                    0.809834586539334
                    -0.076187255533881
                    0.724885370006522
                    -1.000000000000000
                    0.401225789033257
                    1.000000000000000
                    0.539930865846445
                    0.938915184286885
                    -0.503173310661513
                    0.655054557533692
                    -0.153835935465703
                    0.879958906943836
                    0.310626758377062
                    -0.394745559254633
                    -1.000000000000000
                    -0.195951181491429
                    1.000000000000000
                    0.753477926447603
                    1.000000000000000
                    0.584048123832844
                    -1.000000000000000
                    -0.644480091563447
                    -0.352850325617920
                    -0.341067670708133
                    -0.721334127556683
                    -0.684171908557942
                    0.552149299871221
                    0.959219512078649
                    -1.000000000000000
                    1.000000000000000
                    -0.823606385072283
                    0.468578276920469
                    -0.697444467412768
                    -0.885900082755232
                    0.125802778039156
                    -0.473913733835204
                    0.923821783769063
                    -1.000000000000000
                    -0.876757129711821
                    1.000000000000000
                    -0.044623382449390
                    -0.945062989498114
                    -0.613783537943736
                    -1.000000000000000
                    1.000000000000000
                    0.797572924556943
                    -0.843144553510811
                    0.632816244752940
                    0.685940501541897
                    -0.753581845880988
                    1.000000000000000
                    0.346379544896798
                    0.953938717169785
                    ];
            case 8
                p=[
                    -1.000000000000000
                    0.816976039310411
                    -0.813088523685130
                    0.962532697793827
                    -0.556005289967230
                    0.777393998091751
                    -0.538553128559451
                    -1.000000000000000
                    0.019374440389028
                    0.066120496968174
                    -1.000000000000000
                    -0.387331959791342
                    0.930055382512783
                    -0.340327765446746
                    0.204091301159285
                    -0.760093778721971
                    1.000000000000000
                    0.664531630596269
                    1.000000000000000
                    -0.090308254825670
                    0.832424897269449
                    1.000000000000000
                    -0.220016542470186
                    0.510441605777972
                    -0.189062853000837
                    -0.503401618027114
                    -0.180202194886331
                    0.960762038427377
                    0.384339234769367
                    -0.304862564622468
                    0.208452386028004
                    0.749330133881257
                    0.401276987769598
                    0.348357003089568
                    -0.548847869173125
                    -0.756846845961394
                    -0.936746110185588
                    -0.612296007690470
                    0.559802299250783
                    -0.961864984769917
                    1.000000000000000
                    -0.969845779584180
                    0.186731088756260
                    -1.000000000000000
                    0.850317471633383
                    -1.000000000000000
                    1.000000000000000
                    -0.618824661661178
                    -1.000000000000000
                    -0.822702583246328
                    0.694883084762442
                    -0.621284559860095
                    -0.968580516535439
                    -1.000000000000000
                    0.542728515107402
                    0.957443963043886
                    -0.923452382587087
                    0.616104787124987
                    -0.818254131608859
                    -0.963690118005833
                    -0.970320315074140
                    1.000000000000000
                    0.199698646705301
                    1.000000000000000
                    -0.729197036009326
                    -0.327161330864239
                    -0.546614634364901
                    1.000000000000000
                    0.960321765614205
                    0.340708255577715
                    -1.000000000000000
                    0.395156935653100
                    0.924892883270766
                    0.869781044637933
                    0.919260492276964
                    -0.864251598576318
                    -0.193745311785074
                    -0.957881411433957
                    1.000000000000000
                    0.974229134493219
                    0.737898213811948
                    0.011499185703574
                    0.722428285534914
                    0.633431013724168
                    -0.420208845550523
                    -0.029337880716377
                    -0.722728901971647
                    0.328599834011479
                    -0.957910444831079
                    0.002216158969229
                    ];
            case 9
                p=[
                    0.179776405515694
                    0.966967393220941
                    -0.588038400552473
                    0.003481381276571
                    -0.152197586292824
                    0.801594167088989
                    -1.000000000000000
                    -0.312716451231644
                    0.424729847810746
                    -0.771868925304023
                    0.586472839009707
                    -0.363125886276547
                    -1.000000000000000
                    0.313395476963497
                    -0.184722235537946
                    0.193099371440000
                    0.787241576967711
                    0.001231991167915
                    -1.000000000000000
                    -0.884823305058115
                    1.000000000000000
                    -0.977083059387162
                    0.124990539592320
                    0.492224078499230
                    0.857896780534871
                    0.999241248139965
                    -0.802993857703986
                    0.337444390788407
                    1.000000000000000
                    -0.617135674047449
                    -0.974559792767230
                    1.000000000000000
                    0.811426632072895
                    0.625152133909566
                    -0.964808221495878
                    -0.000934850014163
                    -0.446446209213730
                    -0.962992114861564
                    -0.215336158023567
                    1.000000000000000
                    0.682465069890820
                    -0.932186679202136
                    0.972823727076588
                    0.854473988013317
                    1.000000000000000
                    0.024310548391815
                    -0.800047465967487
                    -0.337850760302793
                    -0.180085785566889
                    -1.000000000000000
                    0.313158508614930
                    -0.012433386695536
                    -0.969355352472830
                    0.637083106293095
                    0.971064283467281
                    -0.850086210452416
                    0.178465873510242
                    -0.967136066200247
                    0.856276516850898
                    -1.000000000000000
                    -0.968523479062302
                    -0.631156107338898
                    -0.690361372589788
                    -0.760204941342781
                    0.819514511271245
                    -0.630276818071707
                    -0.690452791458022
                    1.000000000000000
                    -0.893692681645746
                    -0.926411008815792
                    -0.891207295454243
                    0.928557034056007
                    -0.974897994329475
                    -1.000000000000000
                    0.576862625089404
                    0.367084874583001
                    -0.701235860771714
                    -1.000000000000000
                    1.000000000000000
                    0.583169803900778
                    0.966560487907954
                    -0.324775107081122
                    0.672820734009573
                    0.935684250671518
                    0.420647139985186
                    0.775033603053823
                    1.000000000000000
                    0.977443354744995
                    -0.152969823379127
                    -0.802561430915083
                    0.525869071516077
                    -1.000000000000000
                    0.535594770376646
                    1.000000000000000
                    -0.680686814276084
                    0.752926476922233
                    -0.429259691645972
                    0.511021091213101
                    -1.000000000000000
                    0.885505395748290
                    -0.437935610195786
                    -0.519315175435999
                    -0.204592839447878
                    -0.196681817796813
                    0.960314453060054
                    0.331471317723855
                    -0.449575817829251
                    0.955005463471212
                    0.114247379081081
                    -0.501659879362596
                    ];
            case 10
                p=[
                    -0.334736865506737
                    -0.043902298900157
                    -1.000000000000000
                    -0.886838491555918
                    0.971153250311388
                    -0.028827656468249
                    0.011621169900277
                    0.069356541790826
                    -0.702171430367755
                    0.860236994135289
                    -0.982031948920717
                    1.000000000000000
                    0.163867895842016
                    0.972057713448299
                    0.457612261471285
                    0.828605914376135
                    -0.838454778998139
                    0.014333341591451
                    -0.978863584289420
                    -1.000000000000000
                    0.687482254759771
                    0.970036294479223
                    -0.428049007395960
                    0.973078888012947
                    0.316415634358911
                    0.290900072653188
                    1.000000000000000
                    -0.364462291998135
                    0.942219483728895
                    0.912616770670950
                    0.612490658474291
                    0.024247581333672
                    0.440466615418067
                    -0.851012223539978
                    1.000000000000000
                    -0.739691204250846
                    -1.000000000000000
                    0.058353894575797
                    0.842624059542015
                    0.269322788333018
                    -0.959253950430658
                    -0.738604259916556
                    -0.826020519303925
                    -0.518611431741603
                    1.000000000000000
                    -0.979023592897494
                    0.887685538969702
                    1.000000000000000
                    -0.973153760219130
                    -0.278930501669503
                    0.815699137887654
                    0.740336511092638
                    -0.796272489118717
                    0.514034331237522
                    -0.597226590992559
                    0.251538578566036
                    0.937993067344866
                    -0.905894025617891
                    -0.653423629588587
                    -1.000000000000000
                    -0.450858903371398
                    -0.962281383048224
                    0.602418945391339
                    0.522168834913245
                    -0.167596554432532
                    -0.825433818100369
                    1.000000000000000
                    0.782189134251026
                    -0.879480918562327
                    -0.976520453951596
                    0.127869352613195
                    -0.972849609367912
                    0.427936034182181
                    -1.000000000000000
                    1.000000000000000
                    0.240138728185821
                    -0.610201489905896
                    -0.266124565417105
                    -0.698072420711829
                    1.000000000000000
                    -0.968749654484333
                    0.305415957844525
                    0.172169266568028
                    0.644411734364650
                    0.313957676727714
                    -0.240827087780322
                    -1.000000000000000
                    0.877894391069671
                    -0.460909267074259
                    0.670960125239963
                    -1.000000000000000
                    -0.591836991149409
                    1.000000000000000
                    0.982913502646145
                    -0.874391247779812
                    0.974620121639391
                    0.444369892386730
                    1.000000000000000
                    0.776932953624108
                    -0.746325101885292
                    -0.462047040600635
                    -0.631658533813578
                    0.172493019082987
                    -0.660924500919600
                    -1.000000000000000
                    0.589217564766346
                    0.974208525945006
                    0.542703995229441
                    -0.138830930778702
                    -0.416598484844301
                    -0.188881870874613
                    0.426080284545094
                    -0.198037126068772
                    -1.000000000000000
                    0.588933851735210
                    -0.515686327984539
                    0.702918056060580
                    -0.975162800768411
                    0.907704478724380
                    -1.000000000000000
                    0.949176435945093
                    -0.546342962186574
                    0.809311878010208
                    -0.274945291072513
                    -0.688949894033543
                    -0.833522337069568
                    -0.941122505630772
                    0.742910269386580
                    -0.134034438041586
                    0.832507355981799
                    -0.116847664575902
                    1.000000000000000
                    ];
        end
        
    case 3
        
        if n > 5
            error('Degree n must be between 1 and 5 for d=3')
        end
        
        switch n
            
            case 1
                p=[
                    -1.000000000000000
                    0.000000000000000
                    1.000000000000000
                    0.000000000000000
                    -1.000000000000000
                    -0.999999999999998
                    0.000000000000001
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.000000000000001
                    1.000000000000000
                    ];
            case 2
                p=[
                    0.692880093765142
                    -1.000000000000000
                    0.754612336612603
                    1.000000000000000
                    -0.710149875378280
                    -1.000000000000000
                    1.000000000000000
                    0.565211814685968
                    0.747664908437227
                    -0.798399848930066
                    0.551105531854331
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.209090662630953
                    0.675188979287574
                    1.000000000000000
                    -0.687838708829880
                    0.050780530969838
                    -0.166753075090212
                    -0.024459718647161
                    -1.000000000000000
                    -0.631826437119299
                    1.000000000000000
                    -0.746895617578204
                    -1.000000000000000
                    -0.679057415089137
                    -0.188846745663767
                    1.000000000000000
                    1.000000000000000
                    ];
            case 3
                p=[
                    -0.992064032235136
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.311809312867926
                    0.748563266908851
                    -0.334197778954031
                    0.578299092165578
                    -1.000000000000000
                    0.465554604538416
                    1.000000000000000
                    -0.466401244100826
                    0.737737827874229
                    -0.334985450602782
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.945697837799932
                    1.000000000000000
                    -1.000000000000000
                    -0.706731848843840
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.040890109525343
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.126166870641270
                    0.687023382482280
                    -1.000000000000000
                    0.683328414688017
                    1.000000000000000
                    -0.693162704158984
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.212530561942706
                    -0.527963467968391
                    -0.176509459604685
                    0.235357499876634
                    0.516873510573281
                    1.000000000000000
                    -0.696733025706714
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.586306313110747
                    -0.355870479673585
                    -1.000000000000000
                    -0.702116991219369
                    -1.000000000000000
                    1.000000000000000
                    0.436958147540373
                    0.222632362520003
                    -0.500418660600352
                    1.000000000000000
                    0.478567261502949
                    ];
            case 4
                p=[
                    0.940280256391097
                    -1.000000000000000
                    0.470068716932950
                    0.472257786872252
                    -0.999214335204717
                    -0.582326844850857
                    -0.505255754762947
                    1.000000000000000
                    -0.261601211386723
                    1.000000000000000
                    0.170240260760036
                    0.807584086313072
                    -1.000000000000000
                    -0.844220438393798
                    -0.971947017044667
                    0.513762167283863
                    0.301342378941169
                    0.102884164511558
                    0.537041971618505
                    -0.514943980822966
                    0.773960193508409
                    1.000000000000000
                    0.390185408346988
                    -0.768262142612937
                    -0.214726876327411
                    -0.887081083011799
                    0.265738516971033
                    0.166806775239015
                    1.000000000000000
                    0.737703827351941
                    1.000000000000000
                    0.915027637555049
                    0.093206457957707
                    0.116834870543018
                    -1.000000000000000
                    1.000000000000000
                    -0.756804137452921
                    -1.000000000000000
                    -0.367279852895961
                    -0.864392563243680
                    0.112495603837729
                    -1.000000000000000
                    -0.864805127537516
                    1.000000000000000
                    -0.999711259037415
                    -1.000000000000000
                    0.699658979785350
                    -0.588753612168134
                    -0.260715799335213
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.525467233233199
                    0.950520890346713
                    1.000000000000000
                    0.967415533542424
                    0.032516728754549
                    0.784511524040090
                    -1.000000000000000
                    0.973981838870853
                    -0.817866086854815
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.509024137540967
                    0.637835510940182
                    1.000000000000000
                    -0.675422244819492
                    0.421497212699793
                    0.649924366861413
                    0.677122060737117
                    1.000000000000000
                    -0.738095974594295
                    -1.000000000000000
                    -0.457042081264381
                    0.035080451858896
                    -0.783638496956633
                    -0.778275836589347
                    1.000000000000000
                    0.727842458416720
                    -0.334549655467468
                    -1.000000000000000
                    -0.318427205780992
                    -0.457809932663787
                    -0.697221111670570
                    -1.000000000000000
                    0.260245403675183
                    1.000000000000000
                    1.000000000000000
                    -0.972987242374355
                    -0.920750111327421
                    -0.084286292922307
                    0.028858780877969
                    1.000000000000000
                    1.000000000000000
                    -0.583149925403686
                    -0.216340907863389
                    -0.798512832001935
                    0.956381444051676
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.817137089051259
                    ];
            case 5
                p=[
                    -0.879521202491127
                    1.000000000000000
                    -0.585412034240494
                    1.000000000000000
                    0.871994340883567
                    1.000000000000000
                    0.096059972114730
                    0.742352185707893
                    0.752978776053331
                    -1.000000000000000
                    -0.390391748068009
                    -1.000000000000000
                    0.526037351684510
                    -0.705838755365044
                    0.866177785961169
                    0.585424041019563
                    -0.026012068557755
                    0.016310129414457
                    0.913163364718925
                    0.752646650856056
                    0.219511486457106
                    -1.000000000000000
                    0.291965512308492
                    0.764522588803340
                    -0.295682250033185
                    0.999325842794244
                    1.000000000000000
                    1.000000000000000
                    -0.831623581705653
                    -1.000000000000000
                    -1.000000000000000
                    -0.959579227686744
                    -0.440296291353336
                    0.072945623546779
                    1.000000000000000
                    0.014695460378207
                    0.253760352834465
                    -0.943411205486602
                    -0.527817581781629
                    -0.721316299743480
                    -0.697515545050082
                    -0.756792832675856
                    -0.396173803818904
                    0.290981680523515
                    0.285257947627953
                    0.745996761538286
                    -1.000000000000000
                    -0.944901782549159
                    1.000000000000000
                    1.000000000000000
                    -0.247356626883054
                    0.534764872231724
                    -1.000000000000000
                    1.000000000000000
                    0.452433010232748
                    0.573290758890481
                    -1.000000000000000
                    0.621977624354432
                    0.912858596887055
                    1.000000000000000
                    1.000000000000000
                    -0.427853153790798
                    1.000000000000000
                    1.000000000000000
                    0.322058217686755
                    -0.175916022101741
                    0.171251968094776
                    -0.504196796325642
                    -1.000000000000000
                    -0.903686605277664
                    -0.083933531443395
                    -0.187912205163272
                    0.997876305661267
                    0.701685471557609
                    -0.828939593035968
                    0.997454913484734
                    -0.977095997877057
                    0.881320777277162
                    -0.005673057863696
                    -1.000000000000000
                    0.644487252326363
                    -0.990331608995036
                    -0.827189884532014
                    0.337635438185318
                    -0.113348174023991
                    0.105476219182835
                    -0.642288743040541
                    -0.489805710884277
                    0.747817896031211
                    -0.408134316571430
                    -0.920047495388756
                    -0.987737403579166
                    -1.000000000000000
                    -0.925565504433027
                    0.957135998237694
                    -1.000000000000000
                    -0.430571694807508
                    -0.867629051885311
                    1.000000000000000
                    -0.164075866599955
                    0.980077684138625
                    -0.978166626388432
                    -0.951854641799044
                    -1.000000000000000
                    0.906300574413658
                    -0.609192708314501
                    0.264357501595143
                    -1.000000000000000
                    0.853749062111226
                    -0.963000586406477
                    0.116969921346277
                    -1.000000000000000
                    -0.431792993356314
                    1.000000000000000
                    -0.982434349391509
                    0.438964864540917
                    -0.808197440034984
                    0.883938313149613
                    -0.634917480379996
                    -0.504025894162840
                    0.908220434883569
                    1.000000000000000
                    0.710787961024960
                    0.936565219368206
                    1.000000000000000
                    -1.000000000000000
                    -0.287101847252836
                    -1.000000000000000
                    -0.982762687859627
                    0.054502310838468
                    -0.050965706733597
                    1.000000000000000
                    0.529125931027098
                    0.968381101851020
                    -0.707179506250354
                    1.000000000000000
                    -0.371397262813255
                    0.367172614890892
                    0.939593835652243
                    -0.073451606913701
                    -0.985907866526794
                    -0.822598609175280
                    0.499309042095403
                    1.000000000000000
                    -0.625914459842627
                    -0.248538414914542
                    0.839369585511695
                    -0.662806050457837
                    -1.000000000000000
                    0.017797266518443
                    0.882758656783734
                    0.284642167407224
                    0.853074432403917
                    1.000000000000000
                    -1.000000000000000
                    -0.574296833316999
                    -1.000000000000000
                    0.888041029338656
                    -0.078303509717536
                    -0.193827421957458
                    -0.571085432585331
                    -0.078793478882895
                    -1.000000000000000
                    0.972411625481237
                    0.926752776865393
                    -0.775061781482871
                    0.947431335874673
                    0.398215441427577
                    ];
                
        end
        
    case 4
        
        
        if n > 4
            error('Degree n must be between 1 and 4 for d=4')
        end
        
        switch n
            
            case 1
                p=[
                    1.000000000000000
                    1.000000000000000
                    -0.414213562349493
                    1.000000000000000
                    -0.414213562375812
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.414213562366356
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.000000000008187
                    -1.000000000000000
                    0.000000000056656
                    1.000000000000000
                    -1.000000000000000
                    -0.414213562352205
                    -1.000000000000000
                    ];
            case 2
                p=[   1.000000000000000
                    0.522506048983653
                    -1.000000000000000
                    -1.000000000000000
                    0.270876034689870
                    1.000000000000000
                    -0.808331633404568
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.784140987970095
                    0.978475478740200
                    -1.000000000000000
                    -1.000000000000000
                    0.781327188247703
                    -0.632104331424806
                    -1.000000000000000
                    -1.000000000000000
                    -0.825262508705345
                    1.000000000000000
                    1.000000000000000
                    0.004176421580490
                    0.109911922459787
                    0.521712008010789
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.001857638336414
                    1.000000000000000
                    -1.000000000000000
                    -0.627284249104752
                    1.000000000000000
                    -0.821247435534346
                    1.000000000000000
                    -1.000000000000000
                    0.387418088867320
                    -0.959272455447009
                    1.000000000000000
                    0.270317994075196
                    0.797775676634185
                    1.000000000000000
                    -1.000000000000000
                    0.308053728642119
                    -1.000000000000000
                    0.628037016370105
                    -1.000000000000000
                    1.000000000000000
                    -0.388849949251260
                    -0.959436952595989
                    0.312494981411603
                    -1.000000000000000
                    1.000000000000000
                    0.628185760994401
                    -0.051512544069407
                    -0.039997961176925
                    -0.000368138027657
                    -0.816579382986534
                    ];
            case 3
                p=[
                    1.000000000000000
                    0.524149589652267
                    0.826335619553295
                    -0.343973856610992
                    -1.000000000000000
                    0.441535212309535
                    -0.452940399964938
                    -0.163723892286589
                    0.688605428364589
                    0.796900874266341
                    0.069584710787021
                    0.498359521807224
                    -0.243056496414882
                    -0.978008013200150
                    0.273894621847996
                    0.704392308018880
                    0.629201150733907
                    1.000000000000000
                    0.999205988046811
                    -1.000000000000000
                    -0.292148877170362
                    0.220543383137160
                    0.444729214074831
                    -0.974645570543610
                    -0.388760823999568
                    -1.000000000000000
                    1.000000000000000
                    -0.751634965550712
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.773973140059959
                    0.412473888504774
                    -0.123372661978708
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.987230438603881
                    -0.501694528714380
                    -1.000000000000000
                    -1.000000000000000
                    -0.827670018115218
                    -0.698064284046846
                    1.000000000000000
                    -1.000000000000000
                    -0.422334878584947
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.503701503818172
                    1.000000000000000
                    -1.000000000000000
                    0.701157709138579
                    0.149443838230351
                    -0.946179014365696
                    -0.962122390011082
                    0.751867326225050
                    -1.000000000000000
                    0.118678303136549
                    -0.665059078741376
                    0.959358638229945
                    -0.568551355566245
                    -0.776894091720279
                    0.132199120603645
                    -0.536736985969572
                    0.045764429758851
                    -1.000000000000000
                    0.770882283165617
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.980194255977854
                    1.000000000000000
                    0.722554479803677
                    -0.953723686599233
                    0.930392844846919
                    1.000000000000000
                    1.000000000000000
                    0.902223875797087
                    1.000000000000000
                    0.918444773834282
                    -1.000000000000000
                    1.000000000000000
                    0.566993513813055
                    -1.000000000000000
                    0.788309905649046
                    0.689844975107204
                    1.000000000000000
                    0.748004598681748
                    1.000000000000000
                    -1.000000000000000
                    -0.309495165191596
                    0.984228338071140
                    -0.664981423723813
                    0.945172278359073
                    -1.000000000000000
                    -0.953747539251037
                    -1.000000000000000
                    -0.960384318930660
                    -0.100948059430011
                    -0.154030876604596
                    1.000000000000000
                    -0.527583902176999
                    1.000000000000000
                    1.000000000000000
                    -0.805741084637437
                    0.285584103107832
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.437870341844609
                    -1.000000000000000
                    -0.538246330208412
                    1.000000000000000
                    1.000000000000000
                    0.508669430750878
                    -1.000000000000000
                    1.000000000000000
                    0.460924970451356
                    -0.636630984407596
                    -0.174851791006399
                    -0.905951324356213
                    -0.761722613535673
                    -1.000000000000000
                    -1.000000000000000
                    -0.556201303336897
                    0.838172521787786
                    0.134649940007530
                    0.649857807486299
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.680614924669387
                    1.000000000000000
                    -0.911877546105762
                    -1.000000000000000
                    -0.894119411105233
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    ];
            case 4
                p=[
                    0.800885848064965
                    -0.920627970181747
                    -0.871522753834108
                    -1.000000000000000
                    0.514264047313627
                    0.950153502965904
                    1.000000000000000
                    -0.049508822287277
                    0.992329250155354
                    0.808754082506036
                    -1.000000000000000
                    0.317818214227367
                    -1.000000000000000
                    0.237822307081149
                    0.990134211120612
                    -0.166918347251706
                    1.000000000000000
                    -0.221158129731962
                    -0.901387226313377
                    -0.797994521063983
                    1.000000000000000
                    0.147235372127396
                    0.860664725732803
                    0.321877141704888
                    -1.000000000000000
                    0.280272491334979
                    -0.123149989498894
                    0.962851403483667
                    0.197661722430560
                    0.645256467313756
                    -1.000000000000000
                    -1.000000000000000
                    -0.999913602757544
                    -0.544865694900815
                    0.145189635995276
                    -0.368291980246832
                    0.520197362454275
                    -0.450793307786673
                    1.000000000000000
                    1.000000000000000
                    0.925795274501257
                    -0.806375595303532
                    0.993212698024876
                    -0.296894453490533
                    -0.754578576679591
                    1.000000000000000
                    -0.138133536648983
                    1.000000000000000
                    0.476860307391916
                    0.178594074626533
                    -0.066587355944620
                    -0.036406982673261
                    -0.815811223298480
                    -0.184742087464916
                    -0.998022218216782
                    0.328695594782575
                    0.472147882560286
                    0.617269313170438
                    0.561861468110176
                    0.976578180621556
                    1.000000000000000
                    0.634957469337412
                    0.039839254713192
                    -1.000000000000000
                    -0.817596924781186
                    0.945238804844789
                    0.729962907899604
                    0.418928763498886
                    0.753265330623475
                    1.000000000000000
                    -0.641522281178292
                    -0.583869648424623
                    -0.982426248262982
                    -0.585994399153516
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.312269914134148
                    0.291864490691845
                    1.000000000000000
                    0.605270648364638
                    1.000000000000000
                    -1.000000000000000
                    0.996443742900576
                    -0.922517663433368
                    -1.000000000000000
                    0.823134624390787
                    -0.778819721665446
                    -0.192214268246509
                    0.947849947978268
                    -0.726171524045323
                    0.581696003406464
                    0.487217224600790
                    -0.993125559648602
                    0.556416714652609
                    0.427471960226315
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.047385624212981
                    -0.940809731833827
                    -0.380387726848608
                    0.892547806531014
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.895062031843181
                    0.811545484894067
                    0.707061027123300
                    0.052257496861753
                    -0.876283867469524
                    0.853343041603940
                    -1.000000000000000
                    -0.070921369608700
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.368321941032774
                    -0.073256448592299
                    -1.000000000000000
                    -1.000000000000000
                    -0.405808279837534
                    -1.000000000000000
                    -1.000000000000000
                    0.928380974996834
                    0.939260101407835
                    1.000000000000000
                    -0.976310365932675
                    -0.851140141619791
                    -0.878186410180958
                    0.976484231305622
                    0.808998163396047
                    1.000000000000000
                    0.920211839322735
                    -1.000000000000000
                    -1.000000000000000
                    0.714232839013315
                    0.475847328377585
                    -1.000000000000000
                    -0.486135035457285
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.931505491581312
                    0.734146304871365
                    -0.561957417116941
                    -0.859100651701169
                    1.000000000000000
                    -0.838041564460251
                    -1.000000000000000
                    -0.916290219712468
                    0.617076860456098
                    -0.823354548292330
                    -0.687809899866957
                    0.963551323764901
                    1.000000000000000
                    0.160347443261878
                    0.494019618062068
                    1.000000000000000
                    0.998788109507675
                    -1.000000000000000
                    -1.000000000000000
                    0.241216161803441
                    -0.718770142393171
                    -0.867805530734553
                    -0.372899892670776
                    -0.251337239259271
                    -0.440502292036552
                    1.000000000000000
                    -0.019294054158128
                    1.000000000000000
                    -0.999946744685551
                    -0.220131771339373
                    -0.731711962133922
                    -0.928707391418147
                    1.000000000000000
                    1.000000000000000
                    -0.816124922246988
                    0.359052394392446
                    -1.000000000000000
                    1.000000000000000
                    -0.947916673419241
                    1.000000000000000
                    -0.856644512736517
                    0.781338546505729
                    -1.000000000000000
                    -1.000000000000000
                    -0.968067926521711
                    1.000000000000000
                    0.566438851942476
                    0.769505991515332
                    -1.000000000000000
                    -0.370414345540873
                    1.000000000000000
                    -0.592464926434267
                    -1.000000000000000
                    -0.435759288961245
                    0.140515918411138
                    1.000000000000000
                    -0.769481424796716
                    -1.000000000000000
                    1.000000000000000
                    -0.387845338462878
                    -0.016273609278513
                    -0.500908118329280
                    -1.000000000000000
                    1.000000000000000
                    0.915150828883284
                    -0.763645751811121
                    1.000000000000000
                    1.000000000000000
                    0.886186156964491
                    1.000000000000000
                    0.942469608689319
                    -0.217384579883567
                    -0.925197698835096
                    0.268227069297160
                    -1.000000000000000
                    -0.758873215622562
                    1.000000000000000
                    -1.000000000000000
                    -0.334152124664961
                    -0.143605519384665
                    1.000000000000000
                    0.055039176528392
                    -0.778049563248345
                    -1.000000000000000
                    -1.000000000000000
                    0.391787489790080
                    0.968718579117552
                    -0.639698702123644
                    0.251073415358931
                    -1.000000000000000
                    1.000000000000000
                    -0.564972671544732
                    0.449177843476510
                    1.000000000000000
                    0.837724122093497
                    -1.000000000000000
                    0.990808985196688
                    -1.000000000000000
                    0.773028921706952
                    0.963076229563268
                    -0.789055665173747
                    -0.650476957373853
                    0.420756874912398
                    1.000000000000000
                    0.264668656716102
                    1.000000000000000
                    -0.879249111712203
                    -0.640641631782047
                    -0.981098576135245
                    -1.000000000000000
                    -0.913228434584258
                    -0.049172111697709
                    1.000000000000000
                    0.868717474345032
                    1.000000000000000
                    0.552994636193900
                    -0.251387519925427
                    0.634057856520526
                    -0.863776726957973
                    0.958656086840861
                    -1.000000000000000
                    -1.000000000000000
                    -0.497416147146907
                    -0.009873140532504
                    -1.000000000000000
                    -1.000000000000000
                    0.773077434106661
                    -0.379263833612004
                    0.673908092724801
                    0.922190453335143
                    -1.000000000000000
                    -0.168679745382483
                    -0.584793267872891
                    -0.203305440679152
                    0.934770906478889
                    ];
                
        end
        
    case 5
        
        if n > 2
            error('Degree n must be 1 or 2 for d=5')
        end
        
        switch n
            
            
            case 1
                p=[
                    0.094017784572690
                    -0.407358388784454
                    0.489385614148312
                    -0.622089969934911
                    0.373550866730630
                    -0.632977688525461
                    -0.263030807019327
                    0.251237121459381
                    0.560454870302754
                    -0.837748462268429
                    0.858771941937460
                    0.551425357216805
                    -0.026416735193655
                    -0.128282822838162
                    -0.106432501140387
                    -0.387301055966885
                    0.017017310762254
                    0.021543128344219
                    0.635255416644524
                    0.589662833766906
                    0.288636260387383
                    -0.242781234679463
                    0.623160916564954
                    0.065651177598910
                    -0.298545792846233
                    0.878003123999774
                    0.751885622985968
                    0.100312685796844
                    0.244950172002455
                    0.174089409062834
                    ];
            case 2
                p=[
                    -0.943793377753054
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.808702226799966
                    -0.942945880840335
                    1.000000000000000
                    -1.000000000000000
                    0.836239174485304
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.689839171607706
                    -0.007888756428223
                    0.006824321257241
                    -0.265678541711606
                    1.000000000000000
                    -0.283657762294961
                    0.971738380111871
                    -1.000000000000000
                    -0.827151002389843
                    0.834770137372457
                    -1.000000000000000
                    1.000000000000000
                    0.884208789885176
                    0.977348315513980
                    1.000000000000000
                    -1.000000000000000
                    0.916777552313827
                    0.892313663586419
                    -0.885395766180542
                    -1.000000000000000
                    -1.000000000000000
                    -0.872906605555361
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.857315236654593
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.922036859268178
                    -1.000000000000000
                    -1.000000000000000
                    0.013081198140686
                    0.003292144801748
                    0.181931778136408
                    1.000000000000000
                    0.971668549231617
                    -0.998807608627809
                    1.000000000000000
                    -0.994025656535147
                    -1.000000000000000
                    1.000000000000000
                    0.962715182869177
                    -0.936717038736541
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.041661175784470
                    -1.000000000000000
                    -0.209768343868451
                    0.050669602431840
                    -1.000000000000000
                    0.902009185973049
                    0.990553028813692
                    -1.000000000000000
                    -0.986243120929595
                    0.976212150993688
                    -1.000000000000000
                    1.000000000000000
                    0.987892416882944
                    0.986443016801469
                    -0.877460507754205
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.844005769387940
                    0.038219326284589
                    -0.591936840704462
                    -1.000000000000000
                    -0.225812443451532
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.547976900140660
                    -1.000000000000000
                    0.943515743109341
                    0.916973389242046
                    0.914479013083915
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.360661216442968
                    1.000000000000000
                    0.078336963411215
                    -0.031975887615829
                    -0.054293731857785
                    -0.985989787349917
                    -0.991536153798122
                    -0.987420884737367
                    -1.000000000000000
                    -0.979860228937932
                    ];
                
        end
        
    case 6
        
        if n > 2
            error('Degree n must be 1 or 2 for d=6')
        end
        
        switch n
            
            case 1
                p=[
                    -0.993815503519764
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.000000000000001
                    -1.000000000000000
                    -0.993815503519765
                    0.000000000000001
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.993815503519763
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.000000000000002
                    -0.993815503519765
                    -1.000000000000000
                    0.000000000000001
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.936113315212676
                    0.936113315212678
                    -0.936113315212677
                    -0.936113315212678
                    -0.936113315212674
                    -0.993815503519765
                    1.000000000000000
                    1.000000000000000
                    0.000000000000001
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.998175566794242
                    -0.998175566794241
                    0.998175566794239
                    0.998175566794242
                    0.998175566794239
                    ];
            case 2
                p=[
                    0.852551386693950
                    -1.000000000000000
                    -0.894450870596762
                    -0.972207335292587
                    0.857573441391290
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.690990018408395
                    1.000000000000000
                    -0.751808237761460
                    0.842312009895317
                    0.851792843138401
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.571886436943106
                    0.087587742246308
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.969982427661070
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.882135413293385
                    1.000000000000000
                    0.567541244071633
                    -1.000000000000000
                    -0.101821603062422
                    0.377205157164592
                    -1.000000000000000
                    -0.850982499609460
                    -0.591096701131356
                    1.000000000000000
                    0.864288511771176
                    -1.000000000000000
                    -1.000000000000000
                    0.984148165455651
                    1.000000000000000
                    1.000000000000000
                    0.830764346830273
                    -0.826220401400892
                    -0.868796579489096
                    -1.000000000000000
                    1.000000000000000
                    -0.770403066090072
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.425043500252254
                    0.548785133574403
                    1.000000000000000
                    -1.000000000000000
                    -0.207580687413112
                    0.925998706474467
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.969252010064144
                    -0.788404714429841
                    -1.000000000000000
                    0.980693760109685
                    1.000000000000000
                    -0.369606839149658
                    -0.734711277602639
                    0.134700844747823
                    -0.019454798500362
                    -0.096515035946254
                    -1.000000000000000
                    0.351779737904281
                    0.179128691114440
                    0.965650218111699
                    -0.679088314414966
                    -1.000000000000000
                    1.000000000000000
                    -0.883426998517009
                    -0.843309147622664
                    -1.000000000000000
                    0.355907505229752
                    -0.524567957323944
                    0.961798344719000
                    -1.000000000000000
                    0.787737315691603
                    0.940668362483585
                    0.986453022428303
                    -0.754640330198046
                    0.461924228559002
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.717632871563265
                    1.000000000000000
                    1.000000000000000
                    0.788227525933460
                    1.000000000000000
                    -0.805164624525609
                    1.000000000000000
                    -0.996378604601763
                    1.000000000000000
                    -0.477335367344559
                    0.264242210716310
                    0.623568870154464
                    -0.999874312495353
                    1.000000000000000
                    -0.427606340319697
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.707099973892482
                    -1.000000000000000
                    1.000000000000000
                    -0.923962693925434
                    -0.724498959906846
                    -1.000000000000000
                    -1.000000000000000
                    -0.733904847101853
                    -0.571830722465186
                    -0.238961786195997
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.944600774809314
                    0.885311469961420
                    0.951964231460901
                    -0.803073393359412
                    0.223015066712786
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.993655926968015
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.385581016553517
                    1.000000000000000
                    -0.058688770706372
                    0.092449076615140
                    -0.063083935913329
                    -1.000000000000000
                    1.000000000000000
                    0.758967140597573
                    1.000000000000000
                    1.000000000000000
                    -0.985950514856162
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.871965023612205
                    -0.957438563252069
                    0.823957852263972
                    -1.000000000000000
                    -1.000000000000000
                    0.669210374614259
                    -0.988859446632822
                    -0.532061153277837
                    ];
                
        end
        
    case 7
        
        if n > 2
            error('Degree n must be 1 or 2 for d=7')
        end
        
        switch n
            
            case 1
                p=[
                    1.0000
                    1.0000
                    -1.0000
                    1.0000
                    -1.0000
                    0.6241
                    1.0000
                    0.8648
                    1.0000
                    1.0000
                    -1.0000
                    -0.4840
                    0.4622
                    -1.0000
                    -1.0000
                    -1.0000
                    -0.9708
                    -1.0000
                    -1.0000
                    0.9708
                    -0.0000
                    1.0000
                    -1.0000
                    -0.6241
                    1.0000
                    1.0000
                    1.0000
                    -1.0000
                    -0.0407
                    -1.0000
                    1.0000
                    0.8988
                    -1.0000
                    -1.0000
                    -0.0000
                    0.8648
                    -0.4840
                    -0.4622
                    -1.0000
                    1.0000
                    -1.0000
                    1.0000
                    -1.0000
                    0.5153
                    1.0000
                    0.3967
                    1.0000
                    0.9996
                    1.0000
                    -1.0000
                    1.0000
                    -0.9996
                    0.3967
                    0.5153
                    -1.0000
                    -1.0000
                    ];
            case 2
                p=[
                    -1.000000000000000
                    -0.636938452675737
                    -0.646625105018129
                    0.511077326871966
                    1.000000000000000
                    1.000000000000000
                    -0.274439816426885
                    0.839553874311538
                    1.000000000000000
                    0.995613835528794
                    -1.000000000000000
                    -0.651959332835766
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.957976680517745
                    0.950723390340808
                    1.000000000000000
                    0.459406276509384
                    0.589254054538552
                    -0.438283072195806
                    1.000000000000000
                    -1.000000000000000
                    0.971568313297807
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.972504890936077
                    0.964303442296602
                    0.941203749100120
                    -1.000000000000000
                    0.177846446596784
                    1.000000000000000
                    -1.000000000000000
                    0.887622159839926
                    -1.000000000000000
                    -0.711460729532417
                    1.000000000000000
                    1.000000000000000
                    -0.938957067705754
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.367712522253880
                    0.673464962806797
                    -0.807375496963603
                    0.319454825987838
                    1.000000000000000
                    -0.290804461384915
                    -1.000000000000000
                    -1.000000000000000
                    -0.632913682115824
                    0.051640104731139
                    0.957054414267089
                    -0.576557663246912
                    0.760773091223868
                    0.968882419369307
                    1.000000000000000
                    0.234158566519685
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.996550738649383
                    0.553623562653347
                    -1.000000000000000
                    1.000000000000000
                    -0.651837135727368
                    -0.956787948836326
                    0.464463734026470
                    1.000000000000000
                    0.620180358735881
                    -1.000000000000000
                    -0.014540291898874
                    -1.000000000000000
                    0.508244725194745
                    1.000000000000000
                    1.000000000000000
                    -0.782345430664908
                    -0.402117475057845
                    -1.000000000000000
                    1.000000000000000
                    0.824882588202608
                    -0.382326864331215
                    -0.196827002179139
                    -1.000000000000000
                    -0.494567017059540
                    1.000000000000000
                    1.000000000000000
                    -0.124201649793381
                    -1.000000000000000
                    0.837775907907624
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.798695682823644
                    0.104236267846926
                    0.418472183388118
                    -0.048630260881182
                    0.316689769430185
                    -0.637034318701903
                    -0.707680760436812
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.024078220633664
                    -0.927891015092441
                    0.827399944171179
                    -1.000000000000000
                    -0.932043676014082
                    1.000000000000000
                    0.930650036803640
                    0.549441376157715
                    1.000000000000000
                    -1.000000000000000
                    -0.942318231483700
                    0.759885540195117
                    -1.000000000000000
                    0.885353302876032
                    0.965022832137348
                    0.528515879906186
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.871420017822618
                    1.000000000000000
                    -0.895608914225203
                    0.963971033974335
                    -0.971651602803192
                    -1.000000000000000
                    1.000000000000000
                    0.967178742581686
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.990102682247622
                    -1.000000000000000
                    0.676817354337447
                    -0.121808394673783
                    -1.000000000000000
                    -1.000000000000000
                    0.920267841562754
                    1.000000000000000
                    1.000000000000000
                    0.213552228698917
                    1.000000000000000
                    0.752848230902118
                    0.876561806809240
                    -0.698117496374527
                    1.000000000000000
                    -0.571400506613058
                    -1.000000000000000
                    0.070304676676264
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.260228262795448
                    -0.692205864394512
                    -1.000000000000000
                    -1.000000000000000
                    0.727240344121138
                    -0.805118566218829
                    0.990782685600011
                    0.294360050900650
                    1.000000000000000
                    -1.000000000000000
                    0.440624820236663
                    -0.911718852266628
                    1.000000000000000
                    0.511910111162304
                    -0.952162628075398
                    -1.000000000000000
                    -0.680730308128136
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.925918519535714
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.395299725109331
                    0.857723118337135
                    -1.000000000000000
                    0.998881454148062
                    -0.995619661778273
                    -1.000000000000000
                    1.000000000000000
                    0.182688323073871
                    -1.000000000000000
                    0.802504906894956
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.864949007326319
                    -0.758572303730835
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.678309471998777
                    -1.000000000000000
                    -0.816414061684927
                    0.184312532385513
                    0.800765828049913
                    -1.000000000000000
                    -0.788063998731075
                    1.000000000000000
                    -1.000000000000000
                    0.982277277021955
                    -0.059975326975910
                    0.691018351896347
                    -0.966540924960075
                    0.964249187557499
                    0.670180875437728
                    0.759325407697637
                    -0.981338965825306
                    0.393889222487723
                    -0.891113581133506
                    -0.868074879900027
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.996079430487183
                    -0.245377201883046
                    -0.366541003619953
                    0.323346484089322
                    1.000000000000000
                    0.978652702982474
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.748839769292368
                    0.492772808436734
                    1.000000000000000
                    -1.000000000000000
                    ];
                
        end
        
    case 8
        
        if n > 2
            error('Degree n must be 1 or 2 for d=8')
        end
        
        switch n
            
            case 1
                p=[
                    -0.998937656377628
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.992900724638149
                    0.986997743386486
                    -1.000000000000000
                    -1.000000000000000
                    0.994636048608020
                    1.000000000000000
                    0.997171291368534
                    0.763018138733706
                    0.462253416646685
                    -1.000000000000000
                    0.928215823715311
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.960545197055342
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.516455666044955
                    1.000000000000000
                    0.269484665431483
                    1.000000000000000
                    -0.490185637217685
                    -1.000000000000000
                    0.557577219424339
                    -0.999166942346997
                    -0.540677730906867
                    -0.998073741893847
                    -0.289606261205163
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.149103208526309
                    1.000000000000000
                    0.123576785525787
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.090527481903571
                    -0.706642595363025
                    1.000000000000000
                    0.991154735927354
                    -1.000000000000000
                    0.951385328104930
                    1.000000000000000
                    0.127119562388233
                    1.000000000000000
                    1.000000000000000
                    -0.587963691458775
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.266408585358406
                    1.000000000000000
                    -0.531400552132409
                    -0.989560031282697
                    0.999695688385447
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.989826517402203
                    0.999963464686981
                    ];
            case 2
                p=[
                    -0.550165487514989
                    0.945902113698862
                    -1.000000000000000
                    -1.000000000000000
                    -0.794949938204650
                    1.000000000000000
                    1.000000000000000
                    0.204034136625576
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.797000268781778
                    -1.000000000000000
                    -0.169775535438034
                    -0.977155629449580
                    -1.000000000000000
                    0.143585612856122
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.967682043820863
                    1.000000000000000
                    -0.780221720005161
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.961777110253068
                    0.223323357006854
                    -0.547554874053528
                    -0.915687895135298
                    -0.543975217537478
                    1.000000000000000
                    -1.000000000000000
                    -0.985763562293186
                    1.000000000000000
                    0.561124927349667
                    -0.251219731157016
                    1.000000000000000
                    -1.000000000000000
                    0.994011957810513
                    1.000000000000000
                    0.309242412657567
                    0.011011086799161
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.977487373041802
                    -0.867417105800212
                    1.000000000000000
                    0.727707637263390
                    -1.000000000000000
                    1.000000000000000
                    0.885431570993453
                    -1.000000000000000
                    0.960746265004859
                    1.000000000000000
                    1.000000000000000
                    0.527118003797643
                    -0.184587385924703
                    -1.000000000000000
                    -1.000000000000000
                    0.998821026107247
                    0.508138370835519
                    -1.000000000000000
                    -0.036429650015056
                    -1.000000000000000
                    1.000000000000000
                    -0.925046728938471
                    -0.985398393098249
                    1.000000000000000
                    -0.899235269496566
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.603043421351976
                    0.601695241763297
                    1.000000000000000
                    -0.517283242709870
                    0.516128629990122
                    0.674002294756068
                    -0.829015789423727
                    1.000000000000000
                    -0.268842024970107
                    0.949308208107641
                    -0.887218330939194
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.677147516112413
                    -1.000000000000000
                    -0.426948873424782
                    1.000000000000000
                    1.000000000000000
                    0.749521377683952
                    -0.999701369444379
                    0.650020430763497
                    0.878348143522601
                    1.000000000000000
                    1.000000000000000
                    -0.042700879101096
                    -0.619426394695394
                    -1.000000000000000
                    0.934122311333077
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.922448836278570
                    -1.000000000000000
                    0.955950297134312
                    -0.632959188938066
                    -1.000000000000000
                    -0.386127255394755
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.362940541963993
                    0.449954206465787
                    -1.000000000000000
                    -0.150375752027850
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.873463262489924
                    1.000000000000000
                    -0.955138310001303
                    -0.902966261555291
                    0.908863232987448
                    1.000000000000000
                    -0.834531793853415
                    -0.778879958866752
                    1.000000000000000
                    0.027762551492017
                    1.000000000000000
                    1.000000000000000
                    0.780236320913852
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.696898856995970
                    0.846773690622661
                    1.000000000000000
                    0.431545483394277
                    -1.000000000000000
                    -0.944577271977912
                    0.879826766285400
                    0.340625501036824
                    0.273602914829872
                    -1.000000000000000
                    -0.997153507609045
                    -1.000000000000000
                    0.539012201018919
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.716661592860967
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.638357247495186
                    -0.571038920236333
                    0.943420242082080
                    -1.000000000000000
                    -0.834101625410840
                    -0.858401978681013
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.388878944507178
                    -0.687869078372821
                    -0.784826485525885
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.894189085222907
                    0.998585344091643
                    0.942263208415243
                    -0.958252671712098
                    0.257242101089198
                    -0.854583430750554
                    0.725539944168812
                    -0.513017743235383
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.312240521620329
                    -1.000000000000000
                    0.706803556844733
                    1.000000000000000
                    -0.492675691112605
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.915051629202641
                    0.614663232295192
                    1.000000000000000
                    0.150636057249492
                    0.966338353325243
                    1.000000000000000
                    -0.912657452431530
                    -1.000000000000000
                    0.923715026863246
                    0.458218827775675
                    -0.911026775352468
                    0.680016018078143
                    0.463978419696711
                    0.851224820665338
                    -1.000000000000000
                    -0.987490858744857
                    0.908329514697031
                    1.000000000000000
                    0.626659958825712
                    0.766125113329306
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.687012916957835
                    -0.748730940442936
                    -0.843374706445056
                    -1.000000000000000
                    -0.763783404632394
                    -1.000000000000000
                    0.320310349269025
                    -0.910981506190057
                    1.000000000000000
                    -0.193146689854281
                    -0.971573590547510
                    1.000000000000000
                    0.959890493783569
                    -1.000000000000000
                    0.189164276313232
                    0.692193529583572
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.592387873946288
                    0.571027810716927
                    -0.885945044655849
                    -1.000000000000000
                    -0.968253067681156
                    0.648300154469306
                    0.999239098187634
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.985074618614229
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.999645387457963
                    -0.997376362426205
                    -1.000000000000000
                    -1.000000000000000
                    -0.937903785250496
                    -0.370028626441055
                    1.000000000000000
                    1.000000000000000
                    0.715604793466787
                    -1.000000000000000
                    1.000000000000000
                    0.768640692378657
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.889933026902635
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.651112193927168
                    1.000000000000000
                    0.929259872283695
                    0.904285308286120
                    -1.000000000000000
                    -0.681199465890311
                    0.836427635437646
                    -1.000000000000000
                    -1.000000000000000
                    -0.316613739586628
                    0.994447593911732
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.825897941979235
                    -0.654075962300135
                    0.925300822113844
                    -0.993459587478850
                    1.000000000000000
                    0.217260687149879
                    0.861497570449742
                    -0.977224744125694
                    0.912571570572563
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.513460054160438
                    -0.981932975681496
                    -1.000000000000000
                    0.572077838624883
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.552365235309928
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.980579621061826
                    0.939170551300876
                    -0.437145086923547
                    1.000000000000000
                    0.539068076462492
                    -0.115854666725417
                    -0.480632873701789
                    0.574479283688934
                    -0.013562435312618
                    0.736159274185602
                    0.276210546812183
                    0.169366896654820
                    0.634376224126100
                    -1.000000000000000
                    0.947630440156623
                    -0.226328154851178
                    1.000000000000000
                    -1.000000000000000
                    0.767975654277810
                    -0.957578584574536
                    0.194534269850015
                    -0.767334799457152
                    0.546297085472365
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.281627960379237
                    -1.000000000000000
                    -0.662694796542061
                    -0.444294824606760
                    0.477347625450560
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.579378748440336
                    0.993833141049842
                    ];
                
        end
        
    case 9
        
        if n > 1
            error('Degree n must be 1 for d=9')
        end
        
        switch n
            
            case 1
                p=[
                    0.057768851482165
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.998882908773693
                    1.000000000000000
                    1.000000000000000
                    0.326068202663059
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.929033468067797
                    -1.000000000000000
                    0.514945165138080
                    -0.680214715934760
                    -1.000000000000000
                    1.000000000000000
                    0.939835402556877
                    0.421223195564448
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.993198787165719
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.604113968495383
                    -0.532667863429042
                    -1.000000000000000
                    1.000000000000000
                    0.930489585585989
                    -1.000000000000000
                    1.000000000000000
                    -0.161127301412434
                    1.000000000000000
                    -0.908709809563211
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.171352773299513
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.923477554101424
                    0.754320334138738
                    -0.883560380870956
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.051844788217155
                    1.000000000000000
                    0.138308508816312
                    1.000000000000000
                    -1.000000000000000
                    0.139697540207140
                    -1.000000000000000
                    0.675663317396441
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.807078259510979
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.371247988577311
                    -1.000000000000000
                    -0.878665300954127
                    1.000000000000000
                    -1.000000000000000
                    -0.997702221458817
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    ];
                
        end
        
    case 10
        
        if n > 1
            error('Degree n must be 1 for d=10')
        end
        
        switch n
            
            case 1
                p=[
                    0.040398625005914
                    -1.000000000000000
                    -0.622613551236264
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.752378288639972
                    -0.160071394338761
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    0.058908740165500
                    -0.887325941404838
                    -0.419464006322417
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.634172105991957
                    -0.770615432827079
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.912688957934813
                    1.000000000000000
                    0.064101385520710
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -0.330475825215789
                    -0.537853198647528
                    0.107742249746543
                    -1.000000000000000
                    -1.000000000000000
                    -0.308135860718480
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.999338857446039
                    1.000000000000000
                    1.000000000000000
                    -0.224045237698486
                    1.000000000000000
                    0.079855731380984
                    -1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -0.944664665521280
                    -0.643267794675784
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.260030815653669
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    0.718289583764045
                    -0.482692276808558
                    0.510462252598220
                    0.134184974828559
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.459485837595378
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    0.040045519276522
                    -0.630345581983707
                    -1.000000000000000
                    -1.000000000000000
                    0.612644215694807
                    -1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    0.624441592674912
                    -1.000000000000000
                    0.997422172177937
                    1.000000000000000
                    -1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    1.000000000000000
                    -1.000000000000000
                    -0.447014796287453
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    -0.822704345050915
                    0.490731971286546
                    -1.000000000000000
                    -0.293095332709348
                    1.000000000000000
                    -1.000000000000000
                    -1.000000000000000
                    ];
                
        end
        
end

end