| 8 |
|
#include "mkillum.h" |
| 9 |
|
#include "paths.h" |
| 10 |
|
|
| 11 |
– |
#define brt(col) (.263*(col)[0]+.655*(col)[1]+.082*(col)[2]) |
| 12 |
– |
|
| 11 |
|
char DATORD[] = "RGB"; /* data ordering */ |
| 12 |
|
char DATSUF[] = ".dat"; /* data file suffix */ |
| 13 |
|
char DSTSUF[] = ".dist"; /* distribution suffix */ |
| 138 |
|
fprintf(dfp, "2\n%f %f %d\n%f %f %d\n", |
| 139 |
|
1.+.5/n, .5/n, n+1, |
| 140 |
|
0., 2.*PI, m+1); |
| 141 |
< |
brightout(Ninv, 1, m, 1./il->nsamps/brt(il->col), dfp); |
| 142 |
< |
brightout(da, n, m, 1./il->nsamps/brt(il->col), dfp); |
| 141 |
> |
brightout(Ninv, 1, m, 1./il->nsamps/bright(il->col), dfp); |
| 142 |
> |
brightout(da, n, m, 1./il->nsamps/bright(il->col), dfp); |
| 143 |
|
fputeol(dfp); |
| 144 |
|
fclose(dfp); |
| 145 |
|
printf(" %s", dfname(il, 0)); |
| 195 |
|
fprintf(dfp, "2\n%f %f %d\n%f %f %d\n", |
| 196 |
|
1.+1./n, -1.-1./n, n+2, |
| 197 |
|
0., 2.*PI, m+1); |
| 198 |
< |
brightout(Ninv, 1, m, 1./il->nsamps/brt(il->col), dfp); |
| 199 |
< |
brightout(da, n, m, 1./il->nsamps/brt(il->col), dfp); |
| 200 |
< |
brightout(Sinv, 1, m, 1./il->nsamps/brt(il->col), dfp); |
| 198 |
> |
brightout(Ninv, 1, m, 1./il->nsamps/bright(il->col), dfp); |
| 199 |
> |
brightout(da, n, m, 1./il->nsamps/bright(il->col), dfp); |
| 200 |
> |
brightout(Sinv, 1, m, 1./il->nsamps/bright(il->col), dfp); |
| 201 |
|
fputeol(dfp); |
| 202 |
|
fclose(dfp); |
| 203 |
|
printf(" %s", dfname(il, 0)); |
| 233 |
|
cout[1] = il->col[1]; |
| 234 |
|
cout[2] = il->col[2]; |
| 235 |
|
} else { |
| 236 |
< |
cout[0] = cout[1] = cout[2] = brt(il->col); |
| 236 |
> |
cout[0] = cout[1] = cout[2] = bright(il->col); |
| 237 |
|
} |
| 238 |
|
printf("\n0\n3 %f %f %f\n", cout[0], cout[1], cout[2]); |
| 239 |
|
|
| 292 |
|
il->col[2] /= (double)il->nsamps; |
| 293 |
|
} |
| 294 |
|
/* brighter than minimum? */ |
| 295 |
< |
return(brt(il->col) > il->minbrt+FTINY); |
| 295 |
> |
return(bright(il->col) > il->minbrt+FTINY); |
| 296 |
|
} |
| 297 |
|
|
| 298 |
|
|
| 355 |
|
|
| 356 |
|
for (i = 0; i < n; i++) { |
| 357 |
|
for (j = 0; j < m; j++) { |
| 358 |
< |
fputnum(mult*brt(da), fp); |
| 358 |
> |
fputnum(mult*bright(da), fp); |
| 359 |
|
da += 3; |
| 360 |
|
} |
| 361 |
< |
fputnum(mult*brt(da-3*m), fp); /* wrap phi */ |
| 361 |
> |
fputnum(mult*bright(da-3*m), fp); /* wrap phi */ |
| 362 |
|
} |
| 363 |
|
} |