from turtle import * from math import sin,cos,radians from random import random from kandinsky import fill_rect s, c = [], [] speed(0) pensize(1) fill_rect(0,0,320,222,(0,0,0)) hideturtle() def trace(i,n,m): penup() goto(i * s[n % 40], i * c[n % 40]) pendown() goto((i-40)* s[m % 40], (i-40) * c[m % 40]) for i in range(40): r = radians(9 * i) s.append(sin(r)/6) c.append(cos(r)/6) for i in range(600): color(255 - i // 5,220 - i // 3,0) trace(i,i,i+1) if random() > .5 else trace(i,i+1,i)