//AmpAppletLogic.java import java.awt.*; class AmpAppletLogic extends AppletLogic { //independent values. static double Rb = 10000.0; //150000; //150k static double Rc = 10000.0; //5000; static double Vcc = 5.0; static double belta = 60; static double Vbe = 0.71; //0.71v //dependent values. static double Ic_yAxis; static double Vce_xAxis; static int noWaves = 2; static IntRange[] intRg_time, intRg; static FloatRange[] floatRg_time, floatRg; static double period; static double halfPeriod; static double[] amp; static double[] timeStep; static double[] yAmp; private static double[] cur_time; private static int count=0; //the scale factor between the moving waveforms for the circuit and the curves //the size of the waveform for the circuit is half of that of the curves //if it is 2.0 and so on static double scaleFactor = 2.0; static Point up_Left, down_Right;//the screen value without shift(translation) //how par the operating point away from Vcc/Rc point. //fractal = Oper.x/Vcc.x //default = 0.5; operating point is in the middle. static double fractal = 0.5; static Point operPt; static double oper_X = Vcc*fractal, oper_Y=Vcc/Rc*fractal; static double originX; static double Vinpp, Voutpp; // static boolean moving = false; //the distort flags for the output waveforms. // static boolean leftDistort = false; // static boolean rightDistort = false; public static void init(){ set_Vce_xAxis(Vcc); set_Ic_yAxis(Vcc, Rc); period = 85;//100.0; halfPeriod = period/2.0; intRg_time = new IntRange[noWaves]; floatRg_time = new FloatRange[noWaves]; for(int i=0; i