Jittering the eye position or viewer
This describes how to jitter the eye position
when adding distributed ray tracing to the RayTrace software
The first principle is that you should set up
the camera position MainView once and do not change the position of the
viewer or the screen pixels afterwards. To jitter the eye position, you
should do the following.
- First, get the position of the current pizel by calling
MainView->CalcPixelPosition( i, j
); Let's call the returned pixel position p.
(By the way, note that i and j may be
floating point numbers.
- Second, get the position of the viewer. This is the position you
gave to MainView when you initialized it, or you may get it again by
calling MainView->GetCameraPosition(). Let's call this
position c. ("c" for "camera").
- Third, get the "right" and "up" directions, which I will call u and
v, by calling the routines MainView->GetPixeldU() and
MainView->GetPixeldV(). There values are the vector pointing
rightward from a pixel in the screen to its immediate neighboring pixels, and
the vector pointing upward from a pixel to the pixel above. You
might wish to normalize these vectors (depends on how you use them in the next
step). These u and v vectors are fixed, so
they can be obtained ahead of time rather than recomputed for each ray from
- Choosing appropriating, jittered values α and β let the ray start
at C := c + αu
+ βv and have direction
p-C. You should normalize this direction vector.
Sam Buss, March