46 |
|
int argc; |
47 |
|
char *argv[]; |
48 |
|
{ |
49 |
+ |
extern long eclock; |
50 |
|
POINT *row0, *row1, *row2, *rp; |
51 |
|
int i, j, m, n; |
52 |
|
char stmp[256]; |
61 |
|
|
62 |
|
for (i = 8; i < argc; i++) |
63 |
|
if (!strcmp(argv[i], "-e")) |
64 |
< |
scompile(NULL, argv[++i]); |
64 |
> |
scompile(argv[++i], NULL, 0); |
65 |
|
else if (!strcmp(argv[i], "-f")) |
66 |
|
fcompile(argv[++i]); |
67 |
|
else if (!strcmp(argv[i], "-s")) |
72 |
|
modname = argv[1]; |
73 |
|
surfname = argv[2]; |
74 |
|
sprintf(stmp, "%s(s,t)=%s;", XNAME, argv[3]); |
75 |
< |
scompile(NULL, stmp); |
75 |
> |
scompile(stmp, NULL, 0); |
76 |
|
sprintf(stmp, "%s(s,t)=%s;", YNAME, argv[4]); |
77 |
< |
scompile(NULL, stmp); |
77 |
> |
scompile(stmp, NULL, 0); |
78 |
|
sprintf(stmp, "%s(s,t)=%s;", ZNAME, argv[5]); |
79 |
< |
scompile(NULL, stmp); |
79 |
> |
scompile(stmp, NULL, 0); |
80 |
|
m = atoi(argv[6]); |
81 |
|
n = atoi(argv[7]); |
82 |
|
if (m <= 0 || n <= 0) |
92 |
|
row0++; row1++; row2++; |
93 |
|
/* print header */ |
94 |
|
printhead(argc, argv); |
95 |
+ |
eclock = 0; |
96 |
|
/* initialize */ |
97 |
|
comprow(-1.0/m, row0, n); |
98 |
|
comprow(0.0, row1, n); |
221 |
|
int siz; |
222 |
|
{ |
223 |
|
double st[2]; |
224 |
+ |
int end; |
225 |
|
register int i; |
226 |
< |
/* compute one past each end */ |
226 |
> |
|
227 |
> |
if (smooth) { |
228 |
> |
i = -1; /* compute one past each end */ |
229 |
> |
end = siz+1; |
230 |
> |
} else { |
231 |
> |
if (s < -FTINY || s > 1.0+FTINY) |
232 |
> |
return; |
233 |
> |
i = 0; |
234 |
> |
end = siz; |
235 |
> |
} |
236 |
|
st[0] = s; |
237 |
< |
for (i = -1; i <= siz+1; i++) { |
237 |
> |
while (i <= end) { |
238 |
|
st[1] = (double)i/siz; |
239 |
|
row[i].p[0] = funvalue(XNAME, 2, st); |
240 |
|
row[i].p[1] = funvalue(YNAME, 2, st); |
241 |
|
row[i].p[2] = funvalue(ZNAME, 2, st); |
242 |
+ |
i++; |
243 |
|
} |
244 |
|
} |
245 |
|
|