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.33 by greg, Thu Oct 10 09:18:58 1991 UTC

# Line 122 | Line 122 | char  *zfile, *oldfile;
122          float  *zbar[MAXDIV+1];         /* z values */
123          int  ypos;                      /* current scanline */
124          int  ystep;                     /* current y step size */
125 +        int  hstep;                     /* h step size */
126          int  zfd;
127          COLOR  *colptr;
128          float  *zptr;
# Line 172 | Line 173 | char  *zfile, *oldfile;
173   #endif
174          signal(SIGALRM, report);
175          ypos = vresolu-1 - i;
176 <        fillscanline(scanbar[0], zbar[0], hresolu, ypos, psample);
177 <        ystep = psample;
176 >        hstep = (psample*140+49)/99;            /* quincunx sampling */
177 >        ystep = (psample*99+70)/140;
178 >        fillscanline(scanbar[0], zbar[0], hresolu, ypos, hstep);
179                                                  /* compute scanlines */
180          for (ypos -= ystep; ypos > -ystep; ypos -= ystep) {
181                                                          /* bottom adjust? */
# Line 188 | Line 190 | char  *zfile, *oldfile;
190                  zbar[ystep] = zbar[0];
191                  zbar[0] = zptr;
192                                                          /* fill base line */
193 <                fillscanline(scanbar[0], zbar[0], hresolu, ypos, psample);
193 >                fillscanline(scanbar[0], zbar[0], hresolu, ypos, hstep);
194                                                          /* fill bar */
195                  fillscanbar(scanbar, zbar, hresolu, ypos, ystep);
196                                                          /* write it out */
# Line 243 | Line 245 | register COLOR  *scanline;
245   register float  *zline;
246   int  xres, y, xstep;
247   {
248 +        static int  nc = 0;             /* number of calls */
249          int  b = xstep;
250          double  z;
251          register int  i;
252          
253          z = pixvalue(scanline[0], 0, y);
254          if (zline) zline[0] = z;
255 <
256 <        for (i = xstep; i < xres-1+xstep; i += xstep) {
255 >                                /* zig-zag start for quincunx pattern */
256 >        for (i = nc++ & 1 ? xstep/2 : xstep; i < xres-1+xstep; i += xstep) {
257                  if (i >= xres) {
258                          xstep += xres-1-i;
259                          i = xres-1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines