--- ray/src/rt/aniso.c 1992/05/20 14:23:45 2.20 +++ ray/src/rt/aniso.c 1992/10/16 10:20:27 2.22 @@ -20,8 +20,8 @@ extern double specthresh; /* specular sampling thres extern double specjitter; /* specular sampling jitter */ /* - * This anisotropic reflection model uses a variant on the - * exponential Gaussian used in normal.c. + * This routine implements the anisotropic Gaussian + * model described by Ward in Siggraph `92 article. * We orient the surface towards the incoming ray, so a single * surface can be used to represent an infinitely thin object. * @@ -117,7 +117,7 @@ double omega; /* light source size */ dtmp2 *= dtmp2 / av2; /* gaussian */ dtmp = (dtmp1 + dtmp2) / (1.0 + DOT(np->pnorm, h)); - dtmp = exp(-2.0*dtmp) * 1.0/(4.0*PI) + dtmp = exp(-2.0*dtmp) * (1.0/4.0/PI) * sqrt(ldot/(np->pdot*au2*av2)); /* worth using? */ if (dtmp > FTINY) { @@ -163,7 +163,7 @@ double omega; /* light source size */ } else dtmp = 0.0; /* gaussian */ - dtmp = exp(-dtmp) * 1.0/PI + dtmp = exp(-dtmp) * (1.0/PI) * sqrt(-ldot/(np->pdot*au2*av2)); /* worth using? */ if (dtmp > FTINY) {