import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; /**This short class animates the polyhedron exchange display**/ public class Animator implements Runnable { Manager M; int halt; public Animator() {} public Animator(Manager MM) { this.M=MM; } public void run() { halt=1; while(halt==1) { double s=.000001*Math.pow(.5,M.K.SPEED.val); sleep(); double t= M.C.CON_P.PARAMETER[0]; t=t+s; if(t>2) t=0; M.C.CON_P.PARAMETER[0]=t; double u=GroupAction.map(t); M.C.CON_P.PARAMETER[1]=u; M.PC1.repaint(); M.PC2.repaint(); M.T.repaint(); M.C.repaint(); M.K.repaint(); } } public void sleep() { for(int i=0;i<20000;++i) {} } }