from kandinsky import * from math import * fill_rect(0,0,320,222,(0,)*3) def choix(i): if i == 0: return "AAIBDBICDDIBDCICDAIBDEICDMIDDBIADDIDDCIADAIDDEIEDCIFDRIGDSIFDDIEDBIFDEIACZIBDIICDLIDDQIEDRIDDFICDNIDDSIHDRIIDSIEDGIDDPIEDFIGDEIDDOIEDMIFDFIHDTINDUIMDTIEDLIBCYIADDIGDTIIDUIFDQICDKIDDBICCZIDDTIFDGIKDFIBDKILDJICDOIFDPICCJIBDCIGDGICCYHZCXICCIIBDJIDDCIADBIBDMIQDUIJDTIKDSIJDGIBCLICCHIBCMICCKIDCYIEDUIODWINDVIODXINDSICCOIBDAIEDNIQDLIFDHIGDUIPCRICCGIBDDICCFIBCQICDRIDCMIADLIODMICCNIBCXIADAHZDDFXDEIHDUIKDVIM" if i == 1: return "DWISDVIPCSISCTITCSICCEIBCKIADMIPDLINDKIEDBHZDCICELIDCJIACPIMCOILCNIDCIIACOIDCLILDLICDAGADCFYDEFWDFIJDEICDTIODYHSEDHTECHREDHUEAHODZHSECHUEEHTDZHMEAHSEEHREAHNDZHRDYHTEAHQECHWEFHSDXITCUIVCTIRCSIBCPICCDIBDQIGDPIHDQIDCPIPCTICCWIYCVIXCWHZCZHSEBHVDBGADEIKDKHYEGHXEEHQEDHVECHPDZIPCQIDDIHUDAIFDJIKDHIBCWIZCVIQDVIJDDIEDCFZDEGBDCIFDZHQDXHJDYITCWISCXJACWIRDNIBDRIFEAHPEEHVEGHWEDHPEFHRDXISDYHQEFHTCZIEDHHUDZITCRIS" if i == 2: return "CVITDWHRCYJCCXITCQIMDGILCMIKDIHWDJIEDVIIDFFVDHIPDGIHDDIDENICCCIBDSIDCRIRCVIVCSIUCVIWCTIBCVICEMIDCHIACWIUCTIDCSIWCRIBACIADKHWEEHODYHPEBHQCXIUCUICDHFSDIFRDJHXDKIMDSIEELIIDQIEDIIACVJAEBHREGHTEBHUEFHYAJHWDBFZDDGAASDXHPCXIDCVHZDLIMCSIODZHLDYIFD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NDCHKDOHIEGJDDDINERISEDHGDPILDZARGDIMCEIOCDIQDFBTDQIOGIIECJFRCFIMEOBXDTFXBIFWIYDQFHBBFGBLDXHJEJJDDEIXDXJCCOHNEAHECWJMCVHUCSHCDVFKDRFFBBGTBUDDHREQISCZJKDBFADRAPDQEYDGIQEEIRDSHYCAHZATFLAWFICSJIEDIRESHTCWJNCVHQDKJEDCEWDQBSDXBQFUDUFFBJFGBEDEEVDHFYBMFQCDIPEFHGDOHFDKAX" if i == 19: return "FLBHFHDRBYEQIKGJIDAHFYDFAVHYDMJKDABRGRIEEUHXDEHPCVIOEEBLDAFZDHAYGHAZFJDCHJCRJHDIJECQFIBAFHDTFVBCFXAIIFCBIICCHXCTJJEBHDCSIGGKAUHTERIRDIARFXDRFOBNFKBOFQCHGXDGITCRHDCTHWCEFMDWBIFGBAFFBKGDAODZAPGIAXFSDTFZAXFJCJHWCLHVCMIZDYHUDBJMEQIMGPIJGJAWFMBMDAHPEOITCGHCDNBDFEDRFCBCFOBMFLDTFNBPDWHADGBDDAFDDUFWDJAQDRBODGJFEJIMDPHFEAIWCIIVCHIECEINGQBRDVFMCIHFDQITENHPDCHSCIFRCNGYCLGHCPFLDREWDFHVCNHBDVFJAUFKDUFVDEHWCDIF" PTS=250 nb=20 R = 350 w = int(PTS * 80 / 271) h = PTS // 2 - w def coord(n): if n <= h : return (320, 222 - n / h * 222) if n <= h + w : return (320 - 320 * (n-h) / w, 222) if n <= 2 * h + w: return (0, 222 * (n-h-w) / h) return (320 * (n-2*h-w) / w, 0) def conv(s):return 26*(ord(s[0])-65)+ord(s[1])-65 for k in range(nb): fils=choix(k) a=conv(fils[:2]) (x1,y1) = coord(a) for i in range(len(fils)/2-1): a=conv(fils[2*i+2:2*i+4]) (x2,y2)=coord(a) for n in range(R): x=int(x1+(x2-x1)*n/R) y=int(y1+(y2-y1)*n/R) (r,g,b) = get_pixel(x,y) set_pixel(x,y,(min(255,r+5),min(255,g+4), 0)) x1,y1=x2,y2