/*************************************************************************** Title: GraphBrowser/Spline.java Author: Stefan Berghofer, TU Muenchen Options: :tabSize=4: This class is used for drawing spline curves (which are not yet supported by the Java AWT). ***************************************************************************/ package GraphBrowser; import java.awt.*; import java.util.*; import java.io.*; class SplineSection { /*** Section of a spline function ***/ double x_b,x_c,x_d; double y_b,y_c,y_d; int dx,dy; public SplineSection(double xb,double xc,double xd, double yb,double yc,double yd,int dx2,int dy2) { x_b=xb;x_c=xc;x_d=xd; y_b=yb;y_c=yc;y_d=yd; dx=dx2;dy=dy2; } public Point draw(Graphics g,Point s) { double m; int s_x,s_y,e_x=0,e_y=0; int x,y; s_x=s.x;s_y=s.y; if (dx>=dy) { if (dx==0) return s; m=1/((double)dx); for (x=0;x