/////////////////////////////////////////////////////////////////////////// // VI profile plotting applet for GeoTC. // /////////////////////////////////////////////////////////////////////////// // // Master source is at // http://www.abelian.demon.co.uk/tssp/geotc/geoplot.java // // Maintained by Paul Nicholson, paul@abelian.demon.co.uk // import java.awt.*; import java.applet.*; public class Fpoint { public double x; public double y; public Fpoint( double x, double y) { this.x = x; this.y = y; } } public class geoplot extends Applet { public boolean ecor_flag = false; public boolean wbox_flag = false; public String title = ""; public int N = 0; public Fpoint points[] = new Fpoint[100]; public Color bgnd = Color.green; public String bcolor = null; public void init() { N = 0; String s = getParameter( "wbox"); if( s != null && s.equals( "yes")) wbox_flag = true; } public void add_point( double x, double y) { points[N++] = new Fpoint( x, y); } public void set_title( String s) { title = s; repaint(); } public static Fpoint bezier( int N, Fpoint a[], double s) { for( int j=N ; j>0; j--) for( int i=1; i maxd) maxd = points[i].y; double xw = gwid/N; double vscale = d.height/(maxd * 1.1); g.setColor( Color.black); g.drawRect( lbwid, 0, gwid-1, d.height-1); if( wbox_flag) { g.setColor( Color.blue); double x = 0; for( int i=0; i