--- ray/src/gen/mkillum.c 1991/08/13 14:43:49 1.11 +++ ray/src/gen/mkillum.c 1991/11/08 13:17:44 1.14 @@ -42,6 +42,7 @@ struct illum_args thisillum = { /* our illum and defa VOIDID, SAMPDENS, NSAMPS, + 0., }; char matcheck[MAXSTR]; /* current material to include or exclude */ @@ -146,6 +147,7 @@ init() /* start rtrace and set up buffers */ /* set up signal handling */ signal(SIGPIPE, quit); /* start rtrace process */ + errno = 0; maxbytes = open_process(rt.pd, rtargv); if (maxbytes == 0) { eputs(rtargv[0]); @@ -329,6 +331,16 @@ char *nm; break; cp++; continue; + case 'b': /* brightness */ + if (*++cp != '=') + break; + if (!isfltd(++cp, " \t\n")) + break; + thisillum.minbrt = atof(cp); + if (thisillum.minbrt < 0.) + thisillum.minbrt = 0.; + cp = sskip(cp); + continue; case 'o': /* output file */ if (*++cp != '=') break; @@ -376,6 +388,7 @@ printopts() /* print out option default values */ printf("c=n\t\t\t\t# color none\n"); printf("d=%d\t\t\t\t# density of points\n", thisillum.sampdens); printf("s=%d\t\t\t\t# samples per point\n", thisillum.nsamps); + printf("b=%f\t\t\t# minimum average brightness\n", thisillum.minbrt); }