hallo2023.py

Created by schraf

Created on October 31, 2023

8.98 KB


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 "CVITDWHRCYJCCXITCQIMDGILCMIKDIHWDJIEDVIIDFFVDHIPDGIHDDIDENICCCIBDSIDCRIRCVIVCSIUCVIWCTIBCVICEMIDCHIACWIUCTIDCSIWCRIBACIADKHWEEHODYHPEBHQCXIUCUICDHFSDIFRDJHXDKIMDSIEELIIDQIEDIIACVJAEBHREGHTEBHUEFH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PBMFJBNDCIVEBIWDTGZDYIXDMAXGMIECGIREQHSDWFOBODWFLDKBKFRAWDFJCDEHTCRIFAHFZBFELHNDCHKDOHIEGJDDDINERISEDHGDPILDZARGDIMCEIOCDIQDFBTDQIOGIIECJFRCFIMEOBXDTFXBIFWIYDQFHBBFGBLDXHJEJJDDEIXDXJCCOHNEAHECWJMCVHUCSHCDVFKDRFFBBGTBUDDHREQISCZJKDBFADRAPDQEYDGIQEEIRDSHYCAHZATFLAWFICSJIEDIRESHTCWJNCVHQDKJEDCEWDQBSDXBQFUDUFFBJFGBEDEEVDHFYBMFQCDIPEFHGDOHFDKAX"
 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

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.