warnings.filterwarnings("ignore",category=DeprecationWarning)
return [[(cos(a)*x-sin(a)*y).n(),
vg=g.get_pos(); eg=g.edges(); ne=len(eg)
return [[list(vg[eg[i][0]]),list(vg[eg[i][1]])]
def rotate_bezier_path_cubegraph(m,k):
lg=linegraph(g); LG=Graphics()
rlg=[[rotate_line(j*pi/k,lg[i])
for i in range(len(lg))] for j in range(2*k)]
col=(random(),0,random())
LG+=bezier_path(rlg[i],color=col,thickness=.3)
LG.show(axes=False,figsize=(5,5),
title=r'$m=%d; \ k=%d$'%(m,k))
m,k=randint(3,5),randint(3,5)
rotate_bezier_path_cubegraph(m,k)
No comments:
Post a Comment