import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; public class Animation implements Runnable { int halt; Manager M; public Animation() {} public Animation(Manager MM) { this.M=MM; } public void run() { halt=1; Complex[] Z=trim(M.P.ORBIT); int[] n=getN(M.P.STRIPS); int edge=0; int count=0; while(halt==1) { double s=Math.pow(2,22-M.C2.SPEED.val); double t=1.0*count/2048; if(t==1) { count=0; edge=edge+1; } if(edge==Z.length-1) halt=0; if(halt==1) { M.P.POSITION=interpolate(Z,edge,t); forceStrip(n[edge]); ++count; sleep(s); M.repaint(); M.C.repaint(); } } halt=0; M.P.POSITION=new Complex(M.P.SOURCE); forceStrip(-1); restoreSpokes(n); M.repaint(); } public void sleep(double k) { for(int i=0;i=0) M.C.PC.SELECT[1][k].on=1; if(k>=0) M.C.PC.SELECT[3][k].on=1; } public void restoreSpokes(int[] n) { for(int i=0;i=0) { n0[count]=n[i]; ++count; } } int[] n1=new int[count]; for(int i=0;i.000001) { Z1[count]=new Complex(P.z[i]); ++count; z1=new Complex(P.z[i]); } } Complex[] Z2=new Complex[count]; for(int i=0;i