48 |
|
int argc; |
49 |
|
char *argv[]; |
50 |
|
{ |
51 |
+ |
int combine = 1; |
52 |
|
int gotview = 0; |
53 |
|
int rval, i; |
54 |
|
char *err; |
102 |
|
case 'p': |
103 |
|
picture = argv[++i]; |
104 |
|
break; |
105 |
+ |
case 'c': |
106 |
+ |
combine = !combine; |
107 |
+ |
break; |
108 |
|
case 'd': |
109 |
|
case 'l': |
110 |
|
rtargv[rtargc++] = argv[i]; |
183 |
|
if (threshold <= FTINY) |
184 |
|
comp_thresh(); /* compute glare threshold */ |
185 |
|
analyze(); /* analyze view */ |
186 |
+ |
if (combine) |
187 |
+ |
absorb_specks(); /* eliminate tiny sources */ |
188 |
|
cleanup(); /* tidy up */ |
189 |
|
/* print header */ |
190 |
|
printargs(argc, argv, stdout); |
296 |
|
FVECT vd; |
297 |
|
int x, y; |
298 |
|
{ |
299 |
+ |
static int cury = 10000; |
300 |
+ |
static double err, cmpval; |
301 |
+ |
long t; |
302 |
|
FVECT org; /* dummy variable */ |
303 |
|
|
304 |
|
if (x <= -hlim) /* left region */ |
309 |
|
return(viewray(org, vd, &rightview, |
310 |
|
(double)(x-hlim)/(2*sampdens)+.5, |
311 |
|
(double)y/(2*sampdens)+.5)); |
312 |
< |
/* central region */ |
312 |
> |
/* central region */ |
313 |
> |
/* avoid over-counting of poles */ |
314 |
> |
if (cury != y) { |
315 |
> |
err = 0.0; |
316 |
> |
cmpval = sqrt(1.0 - (double)((long)y*y)/((long)vsize*vsize)); |
317 |
> |
cury = y; |
318 |
> |
} |
319 |
> |
err += cmpval; |
320 |
> |
if (err <= 0.5) |
321 |
> |
return(-1); |
322 |
> |
err -= 1.0; |
323 |
|
if (viewray(org, vd, &ourview, .5, (double)y/(2*sampdens)+.5) < 0) |
324 |
|
return(-1); |
325 |
|
spinvector(vd, vd, ourview.vup, h_theta(x)); |