Thanks mljack - lots of good discussion there.
Still confused though. In the bug tracker, Martin Kraus came to the
same conclusions as I did. But his proposal was not followed. The
final comment by 'mmp' suggests that Matrin made a typo by using '+='
instead of '=', but I can't see how. My natural thought was that it
would have to be a '+=' but this was because it seemed to me that this
code was being used to MOVE the ray origin on the HITHER plane.
The original ray origin was at the intersection of a line between the
camera's origin and a point on the focal plane, and the hither plane.
Having generated a new point on the lens that is not at the camera's
origin a new line is formed between this point on the lens and the
same point on the focal plane. The point at which this line intersects
the hither plane should be the new origin of the ray. This is found by
translating (adding to) the ray's origin by a portion of the lens
point's offset depending on how far the hither plane is from the
camera.
And then I read the book text and I wasn't so sure. But now I think I
am a bit more sure again, and Martin explains it so much better than I
ever could. I can understand that his '+=' LOOKS wrong because the
original intent was to RELOCATE the ray origin on the LENS, but the
ray origin is not on the lens. But 'mmp' is Matt Pharr, right? So at
the same time I still think I might be missing something.
Cheers,
Nigel.