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?

  • $\begingroup$ 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. $\endgroup$
    – Dan Hulme
    Aug 6, 2018 at 19:20

1 Answer 1


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.

enter image description here

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.

  • $\begingroup$ I'm given camera center point, so should I use it as $e$? $\endgroup$
    – mavavilj
    Aug 6, 2018 at 20:03
  • $\begingroup$ 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) $\endgroup$ Aug 6, 2018 at 20:12
  • $\begingroup$ 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). $\endgroup$
    – mavavilj
    Aug 6, 2018 at 20:14
  • $\begingroup$ 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. $\endgroup$ Aug 6, 2018 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.