from turtle import * from random import random from kandinsky import set_pixel,fill_rect BL, WH = (0,0,0), (255,)*3 speed(0) hideturtle() def fond(): fill_rect(0,0,320,222,(20,200,255)) for l in range(222): for c in range(320): if random() < l / 222: set_pixel(c,l,(0,40,255)) def go(x,y,d): penup() goto(x,y) setheading(d) pendown() def disque(r,a,c=BL,x=0,y=0,d=0): pencolor(c) s = 1 if d > 0 else -1 for u in range(r): go(x,y+s*u,d) circle(u,180*a) fond() pensize(2) disque(80,1) disque(80,1,WH,d=180) disque(40,1,y=-40,d=180) disque(39,1,WH,x=-2,y=40) disque(10,2,WH,y=-40,d=180) disque(10,2,y=40) go(-1,-80,0) circle(80)