#!/usr/bin/env python
# coding: utf

from turtle import *

A,S=10,0.2

def fit(x,y):
    w,h=screensize()
    return not (x<-w or x>w or y<-h or y>h)

reset()
speed("fastest")
while fit(*pos()):
    width(1+min((2*S)%15,15-(2*S)%15))
    forward(S)
    right(A)
    S+=0.2

exitonclick()

