00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include "common.h"
00031
00032 #include <stdio.h>
00033 #include "vmath.h"
00034 #include "plot3.h"
00035
00036
00037 #define TP_MARK 1
00038 #define TP_LINE 2
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 void
00049 tp_i2list(register FILE *fp, register int *x, register int *y, register int npoints)
00050
00051
00052
00053
00054 {
00055 if (npoints <= 0)
00056 return;
00057
00058 pl_move(fp, *x++, *y++);
00059 while (--npoints > 0)
00060 pl_cont(fp, *x++, *y++);
00061 }
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 void
00073 tp_2list(register FILE *fp, register double *x, register double *y, register int npoints)
00074
00075
00076
00077
00078 {
00079 if (npoints <= 0)
00080 return;
00081
00082 pd_move(fp, *x++, *y++);
00083 while (--npoints > 0)
00084 pd_cont(fp, *x++, *y++);
00085 }
00086
00087
00088 void
00089 PL_FORTRAN(f2list, F2LIST)(FILE **fpp, float *x, float *y, int *n)
00090 {
00091 register int npoints = *n-1;
00092 register FILE *fp = *fpp;
00093
00094 if (npoints <= 0)
00095 return;
00096
00097 pd_move(fp, *x++, *y++);
00098 while (--npoints > 0)
00099 pd_cont(fp, *x++, *y++);
00100 }
00101
00102
00103
00104
00105
00106 void
00107 tp_3list(FILE *fp, register double *x, register double *y, register double *z, register int npoints)
00108 {
00109 if (npoints <= 0)
00110 return;
00111
00112 pd_3move(fp, *x++, *y++, *z++);
00113 while (--npoints > 0)
00114 pd_3cont(fp, *x++, *y++, *z++);
00115 }
00116
00117
00118 void
00119 PL_FORTRAN(f3list, F3LIST)(FILE **fpp, float *x, float *y, float *z, int *n)
00120 {
00121 register int npoints = *n-1;
00122 register FILE *fp = *fpp;
00123
00124 if (npoints <= 0)
00125 return;
00126
00127 pd_3move(fp, *x++, *y++, *z++);
00128 while (--npoints > 0)
00129 pd_3cont(fp, *x++, *y++, *z++);
00130 }
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155 void
00156 tp_2mlist(FILE *fp, register double *x, register double *y, int npoints, int flag, int mark, int interval, double size)
00157
00158
00159
00160
00161
00162
00163
00164
00165 {
00166 register int i;
00167 register int counter;
00168
00169 if (npoints <= 0)
00170 return;
00171
00172 if (flag & TP_LINE)
00173 tp_2list(fp, x, y, npoints);
00174 if (flag & TP_MARK) {
00175 tp_2marker(fp, mark, *x++, *y++, size);
00176 counter = 1;
00177 for (i=1; i<npoints; i++) {
00178 if (counter >= interval) {
00179 tp_2marker(fp, mark, *x, *y, size);
00180 counter = 0;
00181 }
00182 x++; y++;
00183 counter++;
00184 }
00185 }
00186 }
00187
00188
00189
00190
00191
00192 void
00193 PL_FORTRAN(f2mlst, F2MLST)(FILE **fp, float *x, float *y, int *np, int *flag , int *mark, int *interval, float *size)
00194 {
00195 register int i;
00196 register int counter;
00197 register int npoints = *np-1;
00198
00199 if (npoints <= 0)
00200 return;
00201
00202 if (*flag & TP_LINE)
00203 PL_FORTRAN(f2list, F2LIST)(fp, x, y, np);
00204 if (*flag & TP_MARK) {
00205 tp_2marker(*fp, *mark, *x++, *y++, *size);
00206 counter = 1;
00207 for (i=1; i<npoints; i++) {
00208 if (counter >= *interval) {
00209 tp_2marker(*fp, *mark, *x, *y, *size);
00210 counter = 0;
00211 }
00212 x++; y++;
00213 counter++;
00214 }
00215 }
00216 }
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228