是要表白么,嘿嘿,希望这个代码能帮到你哦~(参数不满意可以自己调)
import turtle
import math
wn = turtleScreen()
wnsetworldcoordinates(-2, -2, 2, 2)
alex = turtleTurtle()
alexcolor("red")
alexpensize(2)
alexpenup()
alexspeed(0)
walkStart = -1
walkEnd = 1
i = walkStart
j = walkEnd
while i <= 0 and j >= 0:
y1 = mathsqrt(1 - i i) + (i i) (1/30)
y2 = -mathsqrt(1 - i i) + (i i) (1/30)
y3 = mathsqrt(1 - j j) + (j j) (1/30)
y4 = -mathsqrt(1 - j j) + (j j) (1/30)
alexsetx(i)
alexsety(y1)
alexdot()
alexsety(y2)
alexdot()
alexsetx(j)
alexsety(y3)
alexdot()
alexsety(y4)
alexdot()
i += 001
j -= 001
wnexitonclick()
欢迎分享,转载请注明来源:表白网
评论列表(0条)