| 11 |
|
#include "ray.h" |
| 12 |
|
#include "platform.h" |
| 13 |
|
#include "source.h" |
| 14 |
+ |
#include "func.h" |
| 15 |
|
#include "view.h" |
| 16 |
|
#include "random.h" |
| 17 |
|
|
| 102 |
|
directrelay = 3; |
| 103 |
|
ambounce = 1; |
| 104 |
|
maxdepth = -10; |
| 105 |
+ |
/* initialize calcomp routines */ |
| 106 |
+ |
initfunc(); |
| 107 |
|
/* get options from command line */ |
| 108 |
|
for (i = 1; i < argc; i++) { |
| 109 |
|
while ((rval = expandarg(&argc, &argv, i)) > 0) |
| 525 |
|
char *err; |
| 526 |
|
int nt, np; |
| 527 |
|
SCOLOR vsum; |
| 525 |
– |
COLOR cres; |
| 528 |
|
RAY rr; |
| 529 |
|
double sf; |
| 530 |
|
int i, j; |
| 594 |
|
} |
| 595 |
|
} |
| 596 |
|
} |
| 597 |
< |
/* finish our calculation */ |
| 596 |
< |
while (ray_presult(&rr, 0) > 0) { |
| 597 |
> |
while (ray_presult(&rr, 0) > 0) { /* finish our calculation */ |
| 598 |
|
smultscolor(rr.rcol, rr.rcoef); |
| 599 |
|
saddscolor(vsum, rr.rcol); |
| 600 |
|
} |
| 601 |
< |
/* print our result */ |
| 602 |
< |
scolor_rgb(cres, vsum); |
| 603 |
< |
printf("%.4e %.4e %.4e\n", colval(cres,RED), |
| 603 |
< |
colval(cres,GRN), colval(cres,BLU)); |
| 601 |
> |
for (i = 0; i < NCSAMP; i++) /* print our result */ |
| 602 |
> |
printf(" %.4e", vsum[i]); |
| 603 |
> |
fputc('\n', stdout); |
| 604 |
|
} |