import warnings; warnings.simplefilter('ignore')
from sage.plot.animate import Animation
class MyAnimation(Animation):
def make_image(self,frame,filename,**kwds):
G.set_axes_range(floor(G.xmin()),ceil(G.xmax()),
floor(G.ymin()),ceil(G.ymax()))
G.save_image(filename,**kwds)
return [[(cos(a)*x-sin(a)*y).n(),
vg=g.get_pos(); eg=g.edges(); ne=len(eg)
return [[list(vg[eg[i][0]]),
def rotate_bezier_path_cubegraph(m,k):
lg=linegraph(g); LG=Graphics()
rlg=[[rotate_line(j*pi/k,lg[i])
col=(.3+random()/3,0,.3+random()/3)
LG+=bezier_path(rlg[i],color=col,
MyAnimation([rotate_bezier_path_cubegraph(3,k)
figsize=(5,5),axes=False)
No comments:
Post a Comment