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

Comparing ray/src/util/rpiece.c (file contents):
Revision 2.47 by greg, Wed Aug 22 18:46:36 2007 UTC vs.
Revision 2.48 by greg, Tue Mar 11 02:21:47 2008 UTC

# Line 437 | Line 437 | rpiece(void)                   /* render picture piece by piece */
437          pview = ourview;
438          switch (ourview.type) {
439          case VT_PER:
440 <                pview.horiz = 2.*180./PI*atan(
441 <                                tan(PI/180./2.*ourview.horiz)/hmult );
442 <                pview.vert = 2.*180./PI*atan(
443 <                                tan(PI/180./2.*ourview.vert)/vmult );
440 >                pview.horiz = (2.*180./PI)*atan(
441 >                                tan((PI/180./2.)*ourview.horiz)/hmult );
442 >                pview.vert = (2.*180./PI)*atan(
443 >                                tan((PI/180./2.)*ourview.vert)/vmult );
444                  break;
445          case VT_PAR:
446          case VT_ANG:
# Line 449 | Line 449 | rpiece(void)                   /* render picture piece by piece */
449                  break;
450          case VT_CYL:
451                  pview.horiz = ourview.horiz / hmult;
452 <                pview.vert = 2.*180./PI*atan(
453 <                                tan(PI/180./2.*ourview.vert)/vmult );
452 >                pview.vert = (2.*180./PI)*atan(
453 >                                tan((PI/180./2.)*ourview.vert)/vmult );
454                  break;
455          case VT_HEM:
456 <                pview.horiz = 2.*180./PI*asin(
457 <                                sin(PI/180./2.*ourview.horiz)/hmult );
458 <                pview.vert = 2.*180./PI*asin(
459 <                                sin(PI/180./2.*ourview.vert)/vmult );
456 >                pview.horiz = (2.*180./PI)*asin(
457 >                                sin((PI/180./2.)*ourview.horiz)/hmult );
458 >                pview.vert = (2.*180./PI)*asin(
459 >                                sin((PI/180./2.)*ourview.vert)/vmult );
460 >                break;
461 >        case VT_PLS:
462 >                pview.horiz = sin((PI/180./2.)*ourview.horiz) /
463 >                                (1.0 + cos((PI/180./2.)*ourview.horiz)) / hmult;
464 >                pview.horiz *= pview.horiz;
465 >                pview.horiz = (2.*180./PI)*acos((1. - pview.horiz) /
466 >                                                (1. + pview.horiz));
467 >                pview.vert = sin((PI/180./2.)*ourview.vert) /
468 >                                (1.0 + cos((PI/180./2.)*ourview.vert)) / vmult;
469 >                pview.vert *= pview.vert;
470 >                pview.vert = (2.*180./PI)*acos((1. - pview.vert) /
471 >                                                (1. + pview.vert));
472                  break;
473          default:
474                  fprintf(stderr, "%s: unknown view type '-vt%c'\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines