109 |
|
break; |
110 |
|
case 'c': /* repeat count */ |
111 |
|
repeatcnt = atoi(argv[++i]); |
112 |
+ |
if (repeatcnt < 1) repeatcnt = 1; |
113 |
|
break; |
114 |
|
case 'p': /* pixel aspect or jitter */ |
115 |
|
if (argv[i][2] == 'a') |
155 |
|
(vw.vaft > FTINY) ? " -ld+" : ""); |
156 |
|
return(0); |
157 |
|
} |
158 |
+ |
if ((repeatcnt > 1) & (pj > FTINY)) |
159 |
+ |
initurand(1024); |
160 |
|
if (fromstdin) |
161 |
|
pix2rays(stdin); |
162 |
|
else |
175 |
|
RREAL loc[2] |
176 |
|
) |
177 |
|
{ |
178 |
< |
if (pj > FTINY) { |
179 |
< |
loc[0] += pj*(.5 - frandom())/rs.xr; |
180 |
< |
loc[1] += pj*(.5 - frandom())/rs.yr; |
181 |
< |
} |
178 |
> |
static int nsamp; |
179 |
> |
double xyr[2]; |
180 |
> |
|
181 |
> |
if (pj <= FTINY) |
182 |
> |
return; |
183 |
> |
|
184 |
> |
if (repeatcnt == 1) { |
185 |
> |
xyr[0] = frandom(); |
186 |
> |
xyr[1] = frandom(); |
187 |
> |
} else /* stratify samples */ |
188 |
> |
multisamp(xyr, 2, urand(nsamp++)); |
189 |
> |
|
190 |
> |
loc[0] += pj*(.5 - xyr[0])/rs.xr; |
191 |
> |
loc[1] += pj*(.5 - xyr[1])/rs.yr; |
192 |
|
} |
193 |
|
|
194 |
|
|