head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 97.12.01.03.59.30; author hans; state Exp; branches; next ; desc @animation of chaotic behavior the number crunching thread @ 1.1 log @Initial revision @ text @// the number crunching class - separate thread that calculates // position and velocity of pendulum and returns it // last changed 05/08/97 // status: constructor takes too many arguments import java.util.*; import java.lang.*; class animation extends Thread { // variables used in the static rk4 routine have to be static static double y1[]=new double[2]; static double y2[]=new double[2]; static double damp, ext, phi, w, x; // I need this to reset x0, v0 to initial values double oldy1[]=new double[2]; double oldy2[]=new double[2]; double duration, xstart=0; int delay; Control_Win control; graphic out1, out2; P_Graph phase1, phase2; animation(Control_Win incontrol, double iny1[], double iny2[], double inphi, double indamp, double inw, double inext, double induration, int indelay, graphic inout1, graphic inout2, P_Graph inphase1, P_Graph inphase2) { control = incontrol; y1=iny1; oldy1=iny1; y2=iny2; oldy2=iny2; damp=indamp; delay=indelay; duration=induration; phi=inphi; ext=inext; w=inw; out1=inout1; out2=inout2; phase1=inphase1; phase2=inphase2; } public void cleanup() { y1=oldy1; y2=oldy2; } public void run() { int f_data=0; double k; for(x=0; x