--- ray/src/gen/mkillum2.c 2007/12/12 05:09:58 2.27 +++ ray/src/gen/mkillum2.c 2007/12/13 07:03:37 2.28 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: mkillum2.c,v 2.27 2007/12/12 05:09:58 greg Exp $"; +static const char RCSid[] = "$Id: mkillum2.c,v 2.28 2007/12/13 07:03:37 greg Exp $"; #endif /* * Routines to do the actual calculation for mkillum @@ -392,7 +392,8 @@ my_face( /* make an illum face */ nalt = sqrt(il->sd->nout/PI) + .5; nazi = PI*nalt + .5; redistribute(il->sd, nalt, nazi, u, v, fa->norm, xfm); - il->sampdens = nalt*nazi/PI + .5; + if (!il->sampdens) + il->sampdens = nalt*nazi/PI + .999; } /* write out the face and its distribution */ if (average(il, distarr, n)) { @@ -586,7 +587,8 @@ my_ring( /* make an illum ring */ nalt = sqrt(il->sd->nout/PI) + .5; nazi = PI*nalt + .5; redistribute(il->sd, nalt, nazi, u, v, co->ad, xfm); - il->sampdens = nalt*nazi/PI + .5; + if (!il->sampdens) + il->sampdens = nalt*nazi/PI + .999; } /* write out the ring and its distribution */ if (average(il, distarr, n)) {