};
}
}
private Path generateNewPath() {
RepeatableRandom seq = (RepeatableRandom) seqX.get().createCompatibleRandom();
seqY.set(seq);
// int index = lcg.get().next();
// int x = index % width;
// int y = index / width;
//
// double y0 = (double) y / height;
// double y1 = (double) (y + 1) / height;
//
// double x0 = (double) x / width;
// double x1 = (double) (x + 1) / width;
//
// Box2 bounds = new Box2(x0, y0, x1, y1);
//Point2 p = RandomUtil.uniform(bounds, seq);
Point2 p = RandomUtil.canonical2(seq);
seq.mark();
Color sample = colorModel.sample(seq);
seq.mark();
PathInfo pi = new PathInfo(scene, sample.getWavelengthPacket());
Lens lens = scene.getLens();
PathNode eyeTail = strategy.traceEyePath(lens, p,
pi, seq);
seq.mark();
Light light = scene.getLight();
PathNode lightTail = strategy.traceLightPath(
light, pi, seq);
seq.mark();
return new Path(lightTail, eyeTail);
}