/* ***************************************************************************** curve : draws lines stored in latray and lonray Variable definitions : i - utility variable. ppd - points per degree for screen. Arguments : lonray - array of longitude values. latray - array of latitude values. count - number of points. */ void curve(lonray, latray, count, color) float lonray[], latray[]; short count; char color; { register short i; int x,y; float xfloat,yfloat; static int debug=0; if(debug) printf("CURVE:count %hd, color %c, lon %f, lat %f\n", count,color,lonray[0],latray[0]); /* Eleminate islands of two coincident points */ if((count==2) && (lonray[0]==lonray[1]) && (latray[0]==latray[1])) return; else { /*Draw the lines.*/ map(&lonray[0],&latray[0],&xfloat,&yfloat); x=xfloat; y=yfloat; gmove(x,y); for (i=1; i<=count; i++) { map(&lonray[i],&latray[i],&xfloat,&yfloat); x=xfloat; y=yfloat; gdraw(x,y); } } return; }