# Where should the ray origin be put in perspective camera ray tracing?

Where should the ray origin be put in perspective camera ray tracing?

The following gives a picture of the ray tracing in the perspective camera setting: https://www.cs.cornell.edu/courses/cs4620/2011fa/lectures/06raytracingWeb.pdf

and says that the $$e$$ is the ray origin, which is the same for all rays.

However, I don't understand how $$e$$ is supposed to be selected. Can it be the zero vector? Or perhaps it is supposed to be the camera center?

• You add a link but you don't say how it relates to your question. Please edit your question to explain fully what you understand and what you don't. Aug 6 '18 at 19:20

## 1 Answer

I don't get what you don't understand. All rays originate from the camera so It's basically the start of the camera's pyramid or more technically the viewing frustum.

Depends on the system you are using. Maybe your camera is fixed at the origin and only the world rotates/moves. In this case, usually the camera is fixed at the origin looking in either the +Z or -Z direction depending on if it's left or right handed coordinates system. So the ray origins will be fixed at (0,0,0).

If your camera moves, however, the ray origins also move to where you place the camera.

• I'm given camera center point, so should I use it as $e$? Aug 6 '18 at 20:03
• What exactly do you mean by the camera center? Cameras aren't usually defined using a center point. Maybe it's the eye position, check the diagram (it's the left most point from where all lines are emerging) Aug 6 '18 at 20:12
• It's the center where the camera originates. The it also gives me $up$ vector, which points upwards from the camera, also an angle and a direction (where the camera points). Aug 6 '18 at 20:14
• Yes then that's the camera's eye position, I haven't ever heard of it called by the name camera's center. Rays will originate from that point. Camera's are usually defined by 3 basis vectors, Side, Up and Look_at (X, Y, Z) respectively. The 4th vector is the Eye. Together these 4 vectors can make up the camera's view matrix. Aug 6 '18 at 20:18