<p>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.</p>

<p><a href="https://i.sstatic.net/P3Qs3.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/P3Qs3.jpg" alt="enter image description here"></a></p>

<p>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 <code>(0,0,0)</code>.</p>

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

CC BY-SA 4.0
2018-08-06T20:03:07.597Z
I'm given camera center point, so should I use it as $e$?
mavavilj
CC BY-SA 4.0
2018-08-06T20:12:52.190Z
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)
gallickgunner
CC BY-SA 4.0
2018-08-06T20:14:11.807Z
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).
mavavilj
CC BY-SA 4.0
2018-08-06T20:18:03.977Z
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.
gallickgunner
CC BY-SA 4.0
2018-08-06T19:56:56.080Z
2018-08-06T19:56:56.080Z
gallickgunner
<p>Where should the ray origin be put in perspective camera ray tracing?</p>

<p>The following gives a picture of the ray tracing in the perspective camera setting:
<a href="https://www.cs.cornell.edu/courses/cs4620/2011fa/lectures/06raytracingWeb.pdf" rel="nofollow noreferrer">https://www.cs.cornell.edu/courses/cs4620/2011fa/lectures/06raytracingWeb.pdf</a></p>

<p>and says that the <span class="math-container">$e$</span> is the ray origin, which is the same for all rays. </p>

<p>However, I don't understand how <span class="math-container">$e$</span> is supposed to be selected.
Can it be the zero vector? Or perhaps it is supposed to be the camera center?</p>

CC BY-SA 4.0
2018-08-06T19:20:07.537Z
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.
Dan Hulme
<raytracing>
Where should the ray origin be put in perspective camera ray tracing?
mavavilj
# Where should the ray origin be put in perspective camera ray tracing?

(Asked by: username_0 on 2018-08-06)

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?

**Tags:** raytracing

> **Comments:**
> **username_1**: 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.  

---

## 1 answers

### Answer by username_2 on 2018-08-06. Score: 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](https://i.sstatic.net/P3Qs3.jpg)](https://i.sstatic.net/P3Qs3.jpg)

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.

> **Comments:**
> **username_0**: I'm given camera center point, so should I use it as $e$?  
> **username_2**: 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)  
> **username_0**: 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).  
> **username_2**: 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.  

---

