Here is the documentation for register_shape
, , . , . , .
- ,
import turtle
import numpy as np
tlist = list()
colorlist = ["red", "green", "black", "blue", "brown"]
for i in xrange(5):
tlist.append(turtle.Turtle(shape="turtle"))
tlist[i].color(colorlist[i])
tlist[i].speed(1)
screen = turtle.getscreen()
for i in xrange(100):
screen.tracer(1000)
for t in tlist:
t.right((np.random.rand(1) - .5) * 180)
t.forward(int((np.random.rand(1) - .5) * 100))
screen.update()
import turtle
from time import sleep
tlist = list()
colorlist = ["red", "green", "black", "blue", "brown"]
for i in xrange(5):
tlist.append(turtle.Turtle(shape="turtle"))
tlist[i].color(colorlist[i])
tlist[i].speed(1)
screen = turtle.getscreen()
for i in xrange(100):
screen.tracer(1000)
for i, t in enumerate(tlist):
t.right(33 * i)
t.forward(50 * i)
sleep(1)
screen.update()