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

Comparing ray/src/util/rad.c (file contents):
Revision 2.12 by greg, Fri Jun 25 17:35:49 1993 UTC vs.
Revision 2.19 by greg, Tue Aug 24 20:29:22 1993 UTC

# Line 310 | Line 310 | register int   n;
310   {
311          register char   *cp;
312  
313 <        if (vp == NULL || n < 0 || n >= vp->nass)
313 >        if (vp == NULL | n < 0 | n >= vp->nass)
314                  return(NULL);
315          cp = vp->value;
316          while (n--)
# Line 626 | Line 626 | register char  *op;
626                  op = addarg(op, "-ds .4");
627          else
628                  op = addarg(op, "-ds 0");
629 <        op = addarg(op, "-dt .2 -dc .25 -dr 0 -sj 0 -st .7");
629 >        op = addarg(op, "-dt .2 -dc .25 -dr 0 -sj 0 -st .5");
630          if (vdef(AMBFILE)) {
631                  sprintf(op, " -af %s", vval(AMBFILE));
632                  op += strlen(op);
# Line 634 | Line 634 | register char  *op;
634                  overture = 0;
635          switch (vscale(VARIABILITY)) {
636          case LOW:
637 <                op = addarg(op, "-aa .4 -ad 32");
637 >                op = addarg(op, "-aa .4 -ad 64");
638                  break;
639          case MEDIUM:
640 <                op = addarg(op, "-aa .3 -ad 64");
640 >                op = addarg(op, "-aa .3 -ad 128");
641                  break;
642          case HIGH:
643 <                op = addarg(op, "-aa .25 -ad 128");
643 >                op = addarg(op, "-aa .25 -ad 256");
644                  break;
645          }
646          op = addarg(op, "-as 0");
# Line 690 | Line 690 | register char  *op;
690                  op = addarg(op, "-ds .2 -dj .35");
691          else
692                  op = addarg(op, "-ds .3");
693 <        op = addarg(op, "-dt .1 -dc .5 -dr 1 -sj .7 -st .15");
693 >        op = addarg(op, "-dt .1 -dc .5 -dr 1 -sj .7 -st .1");
694          if (overture = vint(INDIRECT)) {
695                  sprintf(op, " -ab %d", overture);
696                  op += strlen(op);
# Line 702 | Line 702 | register char  *op;
702                  overture = 0;
703          switch (vscale(VARIABILITY)) {
704          case LOW:
705 <                op = addarg(op, "-aa .25 -ad 128 -as 0");
705 >                op = addarg(op, "-aa .25 -ad 196 -as 0");
706                  break;
707          case MEDIUM:
708 <                op = addarg(op, "-aa .2 -ad 300 -as 64");
708 >                op = addarg(op, "-aa .2 -ad 400 -as 64");
709                  break;
710          case HIGH:
711 <                op = addarg(op, "-aa .15 -ad 500 -as 128");
711 >                op = addarg(op, "-aa .15 -ad 768 -as 196");
712                  break;
713          }
714          d = ambval();
# Line 757 | Line 757 | register char  *op;
757                  op = addarg(op, "-ds .1 -dj .7");
758          else
759                  op = addarg(op, "-ds .2");
760 <        op = addarg(op, "-dt .05 -dc .75 -dr 3 -sj 1 -st .03");
760 >        op = addarg(op, "-dt .05 -dc .75 -dr 3 -sj 1 -st .01");
761          sprintf(op, " -ab %d", overture=vint(INDIRECT)+1);
762          op += strlen(op);
763          if (vdef(AMBFILE)) {
# Line 767 | Line 767 | register char  *op;
767                  overture = 0;
768          switch (vscale(VARIABILITY)) {
769          case LOW:
770 <                op = addarg(op, "-aa .15 -ad 200 -as 0");
770 >                op = addarg(op, "-aa .15 -ad 256 -as 0");
771                  break;
772          case MEDIUM:
773 <                op = addarg(op, "-aa .125 -ad 512 -as 128");
773 >                op = addarg(op, "-aa .125 -ad 512 -as 256");
774                  break;
775          case HIGH:
776 <                op = addarg(op, "-aa .08 -ad 850 -as 256");
776 >                op = addarg(op, "-aa .08 -ad 1024 -as 512");
777                  break;
778          }
779          d = ambval();
# Line 804 | Line 804 | char   *ro;
804                  fd = open(vval(OPTFILE), O_WRONLY|O_CREAT|O_TRUNC, 0666);
805                  if (fd < 0 || write(fd, ro, n) != n || close(fd) < 0)
806                          syserr(vval(OPTFILE));
807 <                sprintf(ro, " \"^%s\"", vval(OPTFILE));
807 >                sprintf(ro, " @%s", vval(OPTFILE));
808          }
809   #ifdef MSDOS
810          else if (n > 50) {
# Line 828 | Line 828 | register char  *po;
828                  po = addarg(po, "-r 1");
829                  break;
830          case HIGH:
831 <                po = addarg(po, "-m .15");
831 >                po = addarg(po, "-m .25");
832                  break;
833          }
834          if (vdef(PFILT))
# Line 970 | Line 970 | getview(n, vn)                         /* get view n, or NULL if none */
970   int     n;
971   char    *vn;            /* returned view name */
972   {
973 <        register char   *mv = NULL;
973 >        register char   *mv;
974  
975          if (viewselect != NULL) {               /* command-line selected */
976                  if (n)                          /* only do one */
# Line 985 | Line 985 | char   *vn;            /* returned view name */
985                                  ;
986                          *vn = '\0';
987                  }
988 +                                                /* view number? */
989 +                if (isdigit(viewselect[0]))
990 +                        return(specview(nvalue(vv+VIEW, atoi(viewselect)-1)));
991                                                  /* check list */
992                  while ((mv = nvalue(vv+VIEW, n++)) != NULL)
993                          if (matchword(viewselect, mv))
# Line 993 | Line 996 | char   *vn;            /* returned view name */
996          }
997          mv = nvalue(vv+VIEW, n);                /* use view n */
998          if (vn != NULL & mv != NULL) {
999 <                if (*mv != '-')
1000 <                        while (*mv && !isspace(*mv))
1001 <                                *vn++ = *mv++;
999 >                register char   *mv2 = mv;
1000 >                if (*mv2 != '-')
1001 >                        while (*mv2 && !isspace(*mv2))
1002 >                                *vn++ = *mv2++;
1003                  *vn = '\0';
1004          }
1005          return(specview(mv));
# Line 1026 | Line 1030 | char   *opts;
1030          char    pfopts[128];
1031          char    vs[32], *vw;
1032          int     vn, mult;
1033 +        long    lastdate;
1034                                          /* get pfilt options */
1035          pfiltopts(pfopts);
1036                                          /* get resolution, reporting */
# Line 1056 | Line 1061 | char   *opts;
1061                  else
1062                          badvalue(REPORT);
1063          }
1064 +                                        /* get update time */
1065 +        lastdate = octreedate > matdate ? octreedate : matdate;
1066                                          /* do each view */
1067          vn = 0;
1068          while ((vw = getview(vn++, vs)) != NULL) {
# Line 1063 | Line 1070 | char   *opts;
1070                          sprintf(vs, "%d", vn);
1071                  sprintf(picfile, "%s_%s.pic", vval(PICTURE), vs);
1072                                                  /* check date on picture */
1073 <                if (fdate(picfile) >= octreedate)
1073 >                if (fdate(picfile) >= lastdate)
1074                          continue;
1075                                                  /* build rpict command */
1076                  sprintf(rawfile, "%s_%s.raw", vval(PICTURE), vs);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines