plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

poly.c (245B)


      1 #include "mplot.h"
      2 void plotpoly(int num[], double *ff[]){
      3 	double *xp, *yp, **fp;
      4 	int i, *n;
      5 	n = num;
      6 	fp = ff;
      7 	while((i = *n++)){
      8 		xp = *fp++;
      9 		yp = xp+1;
     10 		move(*xp, *yp);
     11 		while(--i){
     12 			xp += 2;
     13 			yp += 2;
     14 			vec(*xp, *yp);
     15 		}
     16 	}
     17 }