6.turtle库画太极图
1 #太极的简单画法https://www.cnblogs.com/yeu4h3uh2/ 2 import turtle as t 3 t.begin_fill() #用于填充阴鱼的颜色,从begin_fill开始到end_fill之间画的区域全部填充 4 t.seth(180) 5 t.circle(50,180) 6 t.circle(-50,180) 7 t.seth(0) 8 t.circle(100,180) 9 t.end_fill() 10 t.circle(100,180) 11 t.pensize(20) 12 #点阴鱼眼 13 t.penup() 14 t.goto(0,-50) 15 t.pendown() 16 t.color(“white”) 17 t.fd(1) 18 #点阳鱼眼 19 t.penup() 20 t.goto(0,-150) 21 t.pendown() 22 t.color(“black”) 23 t.fd(1)


浙公网安备 33010602011771号