Automatic locus drawing source

AutoTraceDraw.py # 
Import Turtle T AS
t.title ( 'automatic locus drawing')
t.setup (800, 600, 0, 0)
t.pencolor ( "Red")
t.pensize (. 5)
# data read
datals = []
F = Open ( "data.txt")
for F in line:
line = line.replace ( "\ n-", "") of the line can be removed #
datals.append (list (map (eval, line.split ( "")))) # list is separated list of child elements of each line delimited string
Print (datals)
f.close ()
# automatic drawing
for I in Range (len (datals)):
t.pencolor (datals [I] [. 3], datals [I] [. 4], datals [I] [. 5])
t.fd (datals [I] [0])
IF datals [I] [. 1]:
t.rt ( datals [I] [2])
the else:
t.lt (datals [I] [2])

Guess you like

Origin www.cnblogs.com/oycc2000/p/11271852.html