ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/image.c
(Generate patch)

Comparing ray/src/common/image.c (file contents):
Revision 2.37 by greg, Sat Oct 27 03:01:21 2012 UTC vs.
Revision 2.38 by greg, Fri Nov 16 00:14:19 2012 UTC

# Line 221 | Line 221 | double  y
221                  y *= sqrt(v->vn2);
222                  d = x*x + y*y;
223                  z = (1. - d)/(1. + d);
224 <                d = d <= FTINY*FTINY ? PI : sqrt((1.0 - z*z)/d);
225 <                x *= d;
226 <                y *= d;
224 >                x *= (1. + z);
225 >                y *= (1. + z);
226                  direc[0] = z*v->vdir[0] + x*v->hvec[0] + y*v->vvec[0];
227                  direc[1] = z*v->vdir[1] + x*v->hvec[1] + y*v->vvec[1];
228                  direc[2] = z*v->vdir[2] + x*v->hvec[2] + y*v->vvec[2];
# Line 308 | Line 307 | FVECT  p
307                          return;
308                  if (d <= -(1.0-FTINY))
309                          return;         /* really an error */
310 <                d = sqrt(1.0 - d*d) / (1.0 + d);
311 <                ip[0] += DOT(disp,v->hvec)*d/sqrt(v->hn2);
313 <                ip[1] += DOT(disp,v->vvec)*d/sqrt(v->vn2);
310 >                ip[0] += DOT(disp,v->hvec)/((1. + d)*sqrt(v->hn2));
311 >                ip[1] += DOT(disp,v->vvec)/((1. + d)*sqrt(v->vn2));
312                  return;
313          }
314          ip[0] = DOT(disp,v->hvec)/v->hn2 + 0.5 - v->hoff;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines