import turtle from kandinsky import fill_rect fill_rect(0,0,320,222,(0,0,0)) t = turtle t.speed(0) ; t.hideturtle() def clou(A, dep = 0): t.pensize(3) ; t.color((160,140,130)) if dep: t.penup(); t.goto(A); t.pendown(); t.goto(A) def fil(A,B,c): clou(A, 1) ; t.pensize(1) ; t.pencolor(c) ; t.goto(B) ; clou(B) def segment(a,b,n): return [((i*PTS[b][0]+(n-1-i)*PTS[a][0])/(n-1), (i*PTS[b][1]+(n-1-i)*PTS[a][1])/(n-1)) for i in range(n)] def remplir(S1, S2, c): for i in range(len(S1)): fil(S1[i], S2[i], c) if i < len(S1) - 1 : fil(S2[i], S1[i+1], c) PTS = (-71,-50),(0,-55),(1,98),(-31,-61),(71,-58),(-68,-62),(-61,-76),(71,-62),(63,-82),(-78,-93),(83,-98) remplir(segment(0,1,20), segment(2,1,20), (180,40,30)) remplir(segment(3,4,20), segment(4,2,20), (240,30,50)) remplir(segment(5,6,6), segment(7,8,6), (120,150,160)) remplir(segment(6,9,10), segment(8,10,10), (0,100,240))