May-18-2022, 07:17 PM
This one is just a little artwork using the turtle, although the idea of double spiral goes back to one of my first Turtle programs. Looking at the results... tkinter and turtle would benefit from some anti-aliasing.
import random,turtle,time while True: dist = 2 ** random.randint(0,7) limit = (360 / 0.15625) / dist size = 64 / dist turtle.width(dist / 2) turtle.penup() turtle.setheading(90) turtle.goto(0,0) turtle.pendown() turtle.speed("fastest") turtle.color(["#"+''.join([random.choice('ABCDEF0123456789') for i in range(6)])]) for i in range(0,int(limit)): turtle.right(360/(360/10)) turtle.forward(i/size) turtle.penup() turtle.goto(0,0 - (35 / (32 / dist))) turtle.setheading(270) turtle.color(["#"+''.join([random.choice('ABCDEF0123456789') for i in range(6)])]) turtle.pendown() for i in range(0,int(limit)): turtle.right(360/(360/10)) turtle.forward(i/size) time.sleep(10) turtle.clear()