摘要: import turtle as t import math as m pi=3.1415926535 def star5(x,y,r): if x 300: a=-pi/10 else: a=m.atan((y-150)/(x+300)) b=18+a/pi*180 x=x-m.cos(a)*r 阅读全文
posted @ 2025-03-03 12:44 栞栞 阅读(6) 评论(0) 推荐(0)
摘要: `import turtle 设置画布和画笔 turtle.setup(500, 500) # 设置画布大小 turtle.speed(5) # 设置画笔速度 turtle.pensize(2) # 设置画笔粗细 turtle.color("yellow") # 设置画笔颜色 绘制五角星 def d 阅读全文
posted @ 2025-02-25 09:51 栞栞 阅读(14) 评论(0) 推荐(0)
摘要: from turtle import * fillcolor("red") begin_fill() while True: forward(200) right(144) if abs(pos()) < 1: break end_fill() 阅读全文
posted @ 2025-02-25 08:41 栞栞 阅读(5) 评论(0) 推荐(0)