from kandinsky import get_pixel, set_pixel,fill_rect from random import random, randint from math import log import turtle fill_rect(0, 0, 320, 222, (0,105,105)) for l in range(222): y = l for x in range(320): y += 2*random()-1 c = min(255, get_pixel(x,int(y))[1] + 50) set_pixel(x,int(y),(0,c,c)) t = turtle t.pendown() t.color((255,0,0)) t.pensize(2) while True: (x, y) = t.position() if x*x + y*y > 6400: t.penup() t.goto(0,0) t.pendown() cc = int(100+155*random()) t.color((255,cc,0)) else: t.setheading(randint(0,359)) t.fd(-log(random())/.1)