/* Tracker is the canvas class on which the rocket trajectory is drawn */ import java.awt.*; public class Tracker extends Canvas { Launcher L; int h,w,psz,cursor; // height & width of the tracker; plot size final int m=25; // margin for plot int[] xp,yp; // arrays used to hold plot curve coordinates boolean plotExists; // tells whether a curve exists to plot Tracker(Launcher parent, int height, int width) { int idx; L = parent; setBackground(Color.black); setForeground(Color.yellow); h = height; w = width; psz = w-2*m; cursor = m + psz/2; xp = new int[psz]; yp = new int[psz]; for (idx=0; idx0 ? (h-2*m)/yMax : 1.0; for (idx=0; idx