使用Sage绘制动画的一个例子
先把代码放在这里,有时间再解释:
t,u=var(‘t,u’)
cc=[point((cos(t),sin(t)),pointsize=30,rgbcolor='red')+parametric_plot((cos(u),sin(u)),(0,t)) for t in srange(0.01,2*pi,0.2)]
myan=animate(cc,xmin=-1.5, xmax=1.5,ymin=-1.5, ymax=1.5)
show(myan)
生活象筒装的卫生纸,开始的时候怎么扯都不觉得在转,后来转的越来越快。
先把代码放在这里,有时间再解释:
t,u=var(‘t,u’)
cc=[point((cos(t),sin(t)),pointsize=30,rgbcolor='red')+parametric_plot((cos(u),sin(u)),(0,t)) for t in srange(0.01,2*pi,0.2)]
myan=animate(cc,xmin=-1.5, xmax=1.5,ymin=-1.5, ymax=1.5)
show(myan)