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

Comparing ray/src/rt/rpict.c (file contents):
Revision 1.32 by greg, Thu Sep 19 13:55:53 1991 UTC vs.
Revision 1.35 by greg, Mon Oct 21 12:57:57 1991 UTC

# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15   #ifdef BSD
16   #include  <sys/time.h>
17   #include  <sys/resource.h>
18 #else
19 #include  <signal.h>
18   #endif
19 +
20 + #include  <signal.h>
21   #include  <fcntl.h>
22  
23   #include  "view.h"
# Line 40 | Line 40 | double  dstrpix = 0.67;                        /* square pixel distribution
40   double  dstrsrc = 0.0;                  /* square source distribution */
41   double  shadthresh = .05;               /* shadow threshold */
42   double  shadcert = .5;                  /* shadow certainty */
43 < int  directrelay = 0;                   /* number of source relays */
43 > int  directrelay = 1;                   /* number of source relays */
44   int  vspretest = 512;                   /* virtual source pretest density */
45   int  directinvis = 0;                   /* sources invisible? */
46 + double  srcsizerat = .25;               /* maximum ratio source size/dist. */
47  
48   int  maxdepth = 6;                      /* maximum recursion depth */
49   double  minweight = 5e-3;               /* minimum ray weight */
# Line 122 | Line 123 | char  *zfile, *oldfile;
123          float  *zbar[MAXDIV+1];         /* z values */
124          int  ypos;                      /* current scanline */
125          int  ystep;                     /* current y step size */
126 +        int  hstep;                     /* h step size */
127          int  zfd;
128          COLOR  *colptr;
129          float  *zptr;
# Line 172 | Line 174 | char  *zfile, *oldfile;
174   #endif
175          signal(SIGALRM, report);
176          ypos = vresolu-1 - i;
177 <        fillscanline(scanbar[0], zbar[0], hresolu, ypos, psample);
178 <        ystep = psample;
177 >        hstep = (psample*140+49)/99;            /* quincunx sampling */
178 >        ystep = (psample*99+70)/140;
179 >        fillscanline(scanbar[0], zbar[0], hresolu, ypos, hstep);
180                                                  /* compute scanlines */
181          for (ypos -= ystep; ypos > -ystep; ypos -= ystep) {
182                                                          /* bottom adjust? */
# Line 188 | Line 191 | char  *zfile, *oldfile;
191                  zbar[ystep] = zbar[0];
192                  zbar[0] = zptr;
193                                                          /* fill base line */
194 <                fillscanline(scanbar[0], zbar[0], hresolu, ypos, psample);
194 >                fillscanline(scanbar[0], zbar[0], hresolu, ypos, hstep);
195                                                          /* fill bar */
196                  fillscanbar(scanbar, zbar, hresolu, ypos, ystep);
197                                                          /* write it out */
# Line 243 | Line 246 | register COLOR  *scanline;
246   register float  *zline;
247   int  xres, y, xstep;
248   {
249 +        static int  nc = 0;             /* number of calls */
250          int  b = xstep;
251          double  z;
252          register int  i;
253          
254          z = pixvalue(scanline[0], 0, y);
255          if (zline) zline[0] = z;
256 <
257 <        for (i = xstep; i < xres-1+xstep; i += xstep) {
256 >                                /* zig-zag start for quincunx pattern */
257 >        for (i = nc++ & 1 ? xstep/2 : xstep; i < xres-1+xstep; i += xstep) {
258                  if (i >= xres) {
259                          xstep += xres-1-i;
260                          i = xres-1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines