A few Questions #920
-
I am curious on what the reason is for multiplying the variable u by the horizonal vector and adding the variable v times the vertical vector. Is this equivalent to moving the offset vectors by some proportion of u and v in relation to the image size? Also why does gradient change in the y and x direction, the book mentioned that normalizing the vector has something to do with this but I can't seem to wrap my head around why. Additionally why subtract the origin from the lower_left_corner (Esp. if the origin is 0,0,0)?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The "origin" is the origin of the scene rays. This ray origin can be anywhere in the scene; its 3D coordinates are arbitrary, and need not be (0,0,0). After that, we want vectors that go from this camera origin to some 3D pixel coordinate on the virtual image viewport, so we need a direction vector that does that. B - A yields the vector from point A to point B, and pixel coordinate - ray origin gives you the vector from the camera origin (focal point) to the image pixel. That's why we subtract the ray origin point.
Thus, |
Beta Was this translation helpful? Give feedback.
The "origin" is the origin of the scene rays. This ray origin can be anywhere in the scene; its 3D coordinates are arbitrary, and need not be (0,0,0).
After that, we want vectors that go from this camera origin to some 3D pixel coordinate on the virtual image viewport, so we need a direction vector that does that. B - A yields the vector from point A to point B, and pixel coordinate - ray origin gives you the vector from the camera origin (focal point) to the image pixel. That's why we subtract the ray origin point.
horizontal
is the vector from the image viewport lower left corner to the lower right corner.vertical
is the vector from the image lower left corner to the upper left corner.…