aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/plot/libplot/poly.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/plot/libplot/poly.c')
-rw-r--r--src/cmd/plot/libplot/poly.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cmd/plot/libplot/poly.c b/src/cmd/plot/libplot/poly.c
new file mode 100644
index 00000000..e3ff7345
--- /dev/null
+++ b/src/cmd/plot/libplot/poly.c
@@ -0,0 +1,17 @@
+#include "mplot.h"
+void plotpoly(int num[], double *ff[]){
+ double *xp, *yp, **fp;
+ int i, *n;
+ n = num;
+ fp = ff;
+ while((i = *n++)){
+ xp = *fp++;
+ yp = xp+1;
+ move(*xp, *yp);
+ while(--i){
+ xp += 2;
+ yp += 2;
+ vec(*xp, *yp);
+ }
+ }
+}