I want to generate rays from the camera through the viewing plane. To do this, I need the camera position ("eye"), up, right and in the direction of the vectors (where the vector from the camera is in the direction in the direction of the object the camera is looking at) and P, a point on the viewing plane. As soon as I have a generated ray:
ray = camera_eye + t*(P-camera_eye);
where t is the distance along the beam (assume that t = 1 at the moment).
My question is: how to get the 3D coordinates of point P, given that it is in position (i, j) on the viewing plane? Assume that the upper left and lower right corners of the viewing plane are indicated.
NOTE. The viewing plane is not really a plane in the sense that it does not extend infinitely in all directions. Rather, this aircraft can be seen as an image of width. In the x direction, the range is 0 → width, and in the y direction, the range is 0 → height. I want to find the three-dimensional coordinate of the (i, j) th element, 0
c ++ geometry raytracing trigonometry
Myx
source share