automne.py

Created by elodie-gamot

Created on November 30, 2021

3.92 KB

Pour Instagram


from kandinsky import *
from time import *
from random import *

tronc = [
(200,159,6,46,(77,24,8)),
(196,156,4,49,(77,24,8)),
(193,179,4,26,(77,24,8)),
(206,193,2,12,(77,24,8)),
(203,115,6,44,(77,24,8)),
(209,131,2,35,(77,24,8)),
(206,159,3,13,(77,24,8)),
(191,195,2,10,(77,24,8)),
(211,156,3,5,(77,24,8)),
(214,152,3,5,(77,24,8)),
(217,149,3,5,(77,24,8)),
(220,146,3,5,(77,24,8)),
(223,143,3,5,(77,24,8)),
(241,127,3,12,(77,24,8)),
(244,126,16,3,(77,24,8)),
(260,121,16,3,(77,24,8)),
(257,121,3,5,(77,24,8)),
(273,116,3,5,(77,24,8)),
(254,105,3,18,(77,24,8)),
(257,85,2,22,(77,24,8)),
(236,95,2,22,(77,24,8)),
(185,93,3,14,(77,24,8)),
(190,72,4,3,(77,24,8)),
(188,104,9,3,(77,24,8)),
(195,128,8,3,(77,24,8)),
(189,125,8,3,(77,24,8)),
(177,122,14,3,(77,24,8)),
(176,91,9,4,(77,24,8)),
(172,87,6,4,(77,24,8)),
(211,61,4,3,(77,24,8)),
(190,56,4,3,(77,24,8)),
(196,67,13,2,(77,24,8)),
(201,84,22,2,(77,24,8)),
(204,95,13,2,(77,24,8)),
(155,88,17,2,(77,24,8)),
(152,121,16,2,(77,24,8)),
(158,114,10,2,(77,24,8)),
(149,107,10,2,(77,24,8)),
(129,117,23,2,(77,24,8)),
(158,108,2,6,(77,24,8)),
(144,83,13,2,(77,24,8)),
(138,78,13,2,(77,24,8)),
(146,80,2,3,(77,24,8)),
(165,70,2,18,(77,24,8)),
(138,75,2,3,(77,24,8)),
(188,73,2,22,(77,24,8)),
(173,65,2,22,(77,24,8)),
(163,57,2,13,(77,24,8)),
(197,104,4,7,(77,24,8)),
(194,53,2,22,(77,24,8)),
(209,47,2,22,(77,24,8)),
(215,42,2,22,(77,24,8)),
(187,51,3,7,(77,24,8)),
(184,45,3,7,(77,24,8)),
(182,40,2,7,(77,24,8)),
(180,28,2,12,(77,24,8)),
(223,85,3,6,(77,24,8)),
(226,85,8,2,(77,24,8)),
(236,93,9,2,(77,24,8)),
(209,115,27,2,(77,24,8)),
(238,139,11,2,(77,24,8)),
(236,71,9,2,(77,24,8)),
(201,107,3,21,(77,24,8)),
(204,97,5,12,(77,24,8)),
(193,156,3,8,(77,24,8)),
(188,153,5,8,(77,24,8)),
(177,151,11,4,(77,24,8)),
(146,150,19,2,(77,24,8)),
(138,148,10,2,(77,24,8)),
(123,150,17,2,(77,24,8)),
(136,146,6,2,(77,24,8)),
(128,134,2,5,(77,24,8)),
(127,115,2,5,(77,24,8)),
(130,139,6,2,(77,24,8)),
(135,141,2,5,(77,24,8)),
(225,139,13,5,(77,24,8))]

f1=[[229,117,12,12],[200,70,12,12],[183,132,12,8],
[232,146,12,12], [190,88,12,12], [155,90,12,12],
[172,155,12,12], [165,145,12,9], [147,137,12,12],
[108,119,12,12], [127,103,12,12], [159,45,12,12],
[175,16,12,12], [218,44,12,12], [234,77,12,12],
[238,56,12,12], [274,104,12,12],[211,119,10,9],
[256,161,8,8],[142,203,12,5],[186,205,12,5],
[107,207,8,2],[245,206,8,2], [222,205,12,2]]

f2=[[124,125,9,9],[117,100,9,9],[114,148,9,9],
[157,157,9,9],[221,105,9,9],
[276,88,9,9],[251,65,9,9],
[190,40,9,9],[143,119,9,9],
[167,201,9,9],[215,203,7,6],
[253,202,8,6],[245,91,9,9],
[256,76,9,9],[125,56,9,9],
[169,32,9,9],[177,63,9,9],
[217,91,9,9],[176,98,9,9],
[192,76,9,9],[130,153,9,9],
[137,65,9,9],[134,83,9,9],
[153,60,9,9],[168,117,9,9],
[97,133,9,9],[240,108,9,9],
[223,126,9,9],[192,146,9,9],
[217,154,9,9],[260,130,9,9],
[262,107,9,9]]

f3=[[145,99,4,15],[157,73,4,15],
[179,75,4,15],[202,50,4,15],
[249,133,4,15],[291,110,4,15],
[149,152,4,15],[131,68,4,15],
[119,133,4,15],[205,199,4,15],
[236,196,2,15],[157,201,2,15],
[102,198,2,15],[268,202,3,9],
[166,122,4,15],[214,160,4,14],
[215,96,4,15],[181,195,4,15],
[213,32,4,15], [173,51,6,6],
[177,108,6,6],[170,134,6,6],
[229,93,6,6],[216,130,4,15],
[221,73,4,15],[265,87,4,15]]

f4=[[245,118,8,7],[152,123,8,7],
[164,104,8,7],[280,119,8,7],
[136,132,8,7],[228,57,8,7],
[217,66,9,11],[189,114,8,7],
[186,167,8,7],[125,207,8,3],
[209,201,4,4],[238,205,4,4],
[178,205,4,4],[278,206,5,2]]
    
for r in tronc:
  fill_rect(*r)

for i in range(5):
  red=choice([(216,98,24),(255,183,52),(181,168,12),(178,51,34)])
  yellow=choice([(216,98,24),(255,183,52),(181,168,12),(178,51,34)])
  green=choice([(216,98,24),(255,183,52),(181,168,12),(178,51,34)])
  orange=choice([(216,98,24),(255,183,52),(181,168,12),(178,51,34)])
  for f in f1 :
    fill_rect(f[0],f[1],f[2],f[3],red)
  for f in f2 :
    fill_rect(f[0],f[1],f[2],f[3],yellow)
  for f in f3 :
    fill_rect(f[0],f[1],f[2],f[3],green)
  for f in f4 :
    fill_rect(f[0],f[1],f[2],f[3],orange)
  sleep(2)