Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle
- turtle.Screen()
- loop = 0
- lines = 25 #Number of lines drawn
- def create(): #Creates a new instance with the following attributes
- new = turtle.Turtle()
- new.speed = 0
- new.shape("triangle")
- new.up()
- return new
- for _ in range(lines): #Core loop
- new = create() #Sets variable "new" to the created instance via "create" function
- new.right(loop*360/lines) #Calculates the distance required to rotate based on loop count and total lines
- for _ in range(10): #Sub loop to draw each line
- new.forward(15)
- new.stamp()
- loop = loop + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement