taupe_model.py

Created by antarctus

Created on April 16, 2022

3.21 KB

Voter pour votre modèle favori ! Votez sur notre discord !
Élections terminées (du 9 au 16 avril 2022).
Des neufs modèles classiques (ceux étalés sur trois blocs sur la gauche), le premier, deuxième et dernier sont éliminés.


from kandinsky import *

fill_rect(0,0,320,222,(255,)*3)

models=[
[
(0,0,50,50,(160,60,20)),
(5,5,15,15,(255,)*3),
(30,5,15,15,(255,)*3),
(8,8,9,9,(0,)*3),
(33,8,9,9,(0,)*3),
(7,27,10,21,(40,)*3),
(10,30,30,15,(255,0,0)),
(10,36,25,3,(0,)*3),
],[
(0,0,50,50,(160,60,20)),
(5,5,15,15,(255,)*3),
(30,5,15,15,(255,)*3),
(8,8,9,9,(0,)*3),
(33,8,9,9,(0,)*3),
(7,27,10,21,(80,30,10)),
(33,27,10,21,(80,30,10)),
(5,25,14,6,(40,15,5)),
(31,25,14,6,(40,15,5)),
(20,38,10,4,(40,)*3),
],[
(0,0,50,50,(160,60,20)),
(3,5,20,20,(255,)*3),
(27,5,20,20,(255,)*3),
(7,7,14,14,(0,)*3),
(29,7,14,14,(0,)*3),
(13,9,6,6,(240,)*3),
(31,9,6,6,(240,)*3),
(17,30,16,16,(40,)*3),
(21,30,8,8,(220,)*3),
(24,32,2,6,(100,)*3),
],[
( 0,7,50,43,(160,60,20)),
( 8,15,10,10,(255,0,0)),
(32,15,10,10,(255,0,0)),
(5,5,40,5,(255,200,0)),
(0,0,10,10,(150,100,0)),
(20,0,10,10,(150,100,0)),
(40,0,10,10,(150,100,0)),
(8,28,34,8,(40,)*3),
(12,30,8,16,(220,)*3),
(30,30,8,16,(220,)*3),
],[
( 0,10,50,40,(110,60,170)),
( 8,15,10,10,(205,0,150)),
(32,15,10,10,(205,0,150)),
(0,5,50,5,(205,200,150)),
(0,0,10,10,(150,150,150)),
(20,0,10,10,(150,150,150)),
(40,0,10,10,(150,150,150)),
(8,28,34,8,(0,40,190)),
(12,31,8,16,(170,220,250)),
(30,31,8,16,(170,220,250)),
],[
(0,0,50,50,(160,60,20)),
(5,5,15,15,(255,)*3),
(30,5,15,15,(255,)*3),
(8,8,9,9,(0,)*3),
(33,8,9,9,(0,)*3),
(8,37,34,8,(40,)*3),
(12,27,8,16,(220,)*3),
(30,27,8,16,(220,)*3),
],[
(0,0,50,50,(160,60,20)),
(3,5,17,17,(255,)*3),
(30,5,17,17,(255,)*3),
(10,7,8,8,(0,)*3),
(32,7,8,8,(0,)*3),
(8,27,10,18,(40,)*3),
],[
(0,0,50,50,(160,60,20)),
( 4,14,18,5,(40,)*3),
(28,14,18,5,(40,)*3),
(18,10,4,8,(40,)*3),
(28,10,4,8,(40,)*3),
(17,30,16,16,(40,)*3),
(21,30,8,8,(220,)*3),
(24,32,2,6,(100,)*3),
],[
(0,0,50,50,(0,200,0)),
(30,40,6,6,(0,100,0)),
(3,5,17,17,(255,)*3),
(30,5,17,17,(255,)*3),
(12,7,6,6,(0,)*3),
(32,10,10,10,(0,)*3),
(9,30,8,12,(40,)*3),
(9,30,32,8,(40,)*3),
],[
( 0,10,50,40,(160,60,20)),
( 8,15,3,3,(40,)*3),
(32,15,3,3,(40,)*3),
(14,15,3,3,(40,)*3),
(38,15,3,3,(40,)*3),
(11,18,3,3,(40,)*3),
(35,18,3,3,(40,)*3),
( 8,21,3,3,(40,)*3),
(32,21,3,3,(40,)*3),
(14,21,3,3,(40,)*3),
(38,21,3,3,(40,)*3),
(0,5,50,5,(255,200,0)),
(0,0,10,10,(150,100,0)),
(20,0,10,10,(150,100,0)),
(40,0,10,10,(150,100,0)),
(8,28,34,8,(40,)*3),
(12,30,8,16,(220,)*3),
(30,30,8,16,(220,)*3),
],[
(0,0,50,50,(160,60,20)),
(0,0,50,12,(0,80,0)),
(0,0,6,20,(0,80,0)),
(44,0,6,20,(0,80,0)),
(0,4,50,4,(0,180,0)),
(2,0,2,20,(0,180,0)),
(15,0,2,12,(0,180,0)),
(33,0,2,12,(0,180,0)),
(46,0,2,20,(0,180,0)),
(8,13,15,15,(255,)*3),
(27,13,15,15,(255,)*3),
(11,16,9,9,(0,)*3),
(30,16,9,9,(0,)*3),
(8,32,34,8,(40,)*3),
( 8,32,8,14,(40,)*3),
(36,32,8,14,(40,)*3),
],[
(0,0,50,50,(160,60,20)),
(5,5,15,15,(255,)*3),
(30,5,15,15,(255,)*3),
(8,6,9,9,(0,)*3),
(33,6,9,9,(0,)*3),
(10,38,30,5,(40,)*3),
(10,30,5,12,(40,)*3),
],[
(0,0,50,50,(160,60,20)),
(5,5,15,15,(255,)*3),
(30,5,15,15,(255,)*3),
(8,8,9,9,(0,)*3),
(33,8,9,9,(0,)*3),
(30,33,5,5,(40,)*3),
(10,25,20,20,(255,50,100)),
(12,27,16,16,(255,100,150)),
]]

def draw_model(model,x,y,scale=50):
  coef=scale/50
  for m in model:
    fill_rect(x+int(m[0]*coef),y+int(m[1]*coef),int(m[2]*coef),int(m[3]*coef),m[4])

def test():
  for i in range(len(models)):
    draw_model(models[i],10+60*(i%5),20+70*(i//5))

test()

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 cookies policy.