ali dossani's profile

Trippy turtle- Something Cool

import turtle
import colorsys
window = turtle.Screen()
window.bgcolor("black")
#turtle.tracer(0,0)
turtle.speed(0)
print("the modifications on the shape will affect the spiral produced")
sides = int(input("how many sides do you want? "))
length = int(input("how long do you want the sides to be? "))
def polygon(sides,length):
    shape = turtle.Pen()
    for k in range(1000):
        length += 1
        color = colorsys.hsv_to_rgb(k / 1000.0, 1.0, 1.0)
        shape.right(1)
        for i in range(sides):
            shape.color(color)
            shape.forward(length)
            shape.left(360/sides)

polygon(sides,length)
turtle.exitonclick()
Trippy turtle- Something Cool
Published:

Trippy turtle- Something Cool

Cool stuff with turtles

Published:

Creative Fields