////Play button//// resetclock(); playanimation(); Animeflg=1; Dirflg=1; sorg=Current; aa=1/(0.25+0.75*random()); angstart=ang2; ////ketlib//// use("KetCindyPlugin"); Dircdy=loaddirectory; setdirectory(gethome()); import("ketcindy.ini"); Maketable(all):=( Circledata("1",[pO,r1],["Msg=n","dr,2"]); Circledata("2",[pO,r2],["Msg=n","dr,2"]); tmp=apply(1..(all),[seq_#,#]); tmp=sort(tmp,#_1); seq2=apply(tmp,#_2); wL=[]; forall(1..all, ang0=(#-1)*2*pi/all; ang1=#*2*pi/all; wL=append(wL,ang0); tmp=[cos(ang0),sin(ang0)]; Listplot(text(#),[r1*tmp,r2*tmp],["dr,3","Msg=n"]); tmp=[cos((ang0+ang1)/2),sin((ang0+ang1)/2)]; Letter((r1+r2)/2*tmp,"c",text(seq2_#)); ); allinit=all; ); aa=1; out=apply(1..100,[#,random()]); out=sort(out,#_2); seq=apply(out,#_1); pO=[0,0]; r1=4; r2=5; angstart=0; allinit=36; Initglist(); Maketable(allinit); Setglist(); ////figures//// Ketinit(); Addglist(); Setketcindyjs(["Nolabel=all"]);//no ketjs on Seteditable(0,["all=36","Size=18","Width=80"]); Seteditable(10,["rat=3","Size=18","Width=80"]);//no ketjs off Addax(0); str="all=36";// no ketjs off //str=Textedit(0);//only ketjs if(length(str)>0,parse(str+";"),all=36); if(all!=allinit, Initglist(); Maketable(all); Setglist(); ); str="rat=3";// no ketjs off //str=Textedit(10);//only ketjs if(length(str)>0,parse(str+";"),rat=3); //dang=0.025; //tmp=[cos(dang),sin(dang)]; //Listplot("t1",[pO,r1*tmp],["Color=red"]); //rat=3; mxs=12/aa; s=Animationparam(0,1,[0,mxs]); ss=rat*s; b=2; c=b/(2*rat*mxs); ang=angstart-c*ss^2+b*ss; ang2=mod(ang,2*pi); Eps=0.001; dang=0.025; flg=0; if(s>mxs-Eps, tmp=select(wL,|ang2-#|0, th=tmp_1; if(ang2