int numPixels = width * height;
int samplesPerPixel = passes * lightPathsPerEyePath;
double lightImageWeight = 1.0 / (double) samplesPerPixel;
Light light = scene.getLight();
Lens lens = scene.getLens();
Animator animator = scene.getAnimator();
initialize();
raster.get().clear();
for (int n = 0, y = 0; y < height; y++) {
if (!monitor.notifyProgress(n, numPixels))
return null;
y0 = (double) y / h;
y1 = (double) (y + 1) / h;
for (int x = 0; x < width; x++, n++) {
x0 = (double) x / w;
x1 = (double) (x + 1) / w;
bounds = new Box2(x0, y0, x1, y1);
for (int i = 0; i < passes; i++) {
if (shutter != null) {
double time = RandomUtil.uniform(shutter, random);
animator.setTime(time);
}
Point2 p = RandomUtil.uniform(bounds, random);
Color sample = colorModel.sample(random);
PathInfo path = new PathInfo(scene, sample.getWavelengthPacket());