用户:
LBN查看:0 回复:0 评论:0 创建时间:2022-08-02T09:51:02
【作品展示】

【作品介绍】
【作品源代码】
from vpython import *
ball = sphere(pos=vector(0,-2,0),radius=0.5,color=color.blue)
U=extrusion(path=[vec(0,0,0),vec(0,0,-1)],
shape=shapes.arc(pos=[0,1],
radius=4,angle1=pi,thickness=0.3))
s=100
while True:
rate(100)
ball.rotate(angle=pi/4000*s,axis=vector(0,2,5),
origin=vector(0,2,0))
if ball.pos.x<0:
s+=4
else:
s-=4
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn