from turtle import * from math import * from kandinsky import fill_rect fill_rect(0,0,320,222,(0,0,0)) b, w, d = -1.2, .006, .6 sd, cd, cb = sin(d), cos(d), cos(b) pencolor(255,255,0) pensize(2) for k in range(810): i = .1 * k b += w * cb sb, cb = sin(b), cos(b) ci = cos(i) * cb x = 90 * sin(i) * cb y = 90 * (sb * cd + ci * sd) if sb * sd < ci * cd: penup() goto(x, y) pendown() goto(x, y) hideturtle()