<p>Copying this from another thread where i posted this as the answer but as Wyck suggested, the correct answer is the first one.</p>

<p>There is the whole derivation of it but I'll be discussing a brief overview.
This is for the perspective projection  where the line joining the eye and the center of the projection/image plane is perpendicular to it. Like here</p>

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

<p>As we can easily see, by similar triangles <span class="math-container">$\triangle ABC$</span> and <span class="math-container">$\triangle AEF$</span> we have</p>

<p><span class="math-container">$Y_p / Y = D/-Z$</span></p>

<p>where <span class="math-container">$Y_p$</span> is the projected <span class="math-container">$Y$</span> coordinate on to the image plane. <span class="math-container">$AB = D$</span> is the total distance from eye to the image plane and is usually set to 1.</p>

<p>Hence we have,</p>

<p><span class="math-container">$Y_p = (Y*D)/-Z$</span></p>

<p>We  can easily ee from here that,</p>

<p><span class="math-container">$tan(\theta_{fov}/2) = 1/AB$</span> </p>

<p><span class="math-container">$tan(\theta_{fov}/2) = 1/D$</span></p>

<p><span class="math-container">$D = 1 /tan(\theta_{fov}/2)$</span></p>

<p>Hence we have,
<span class="math-container">$Y_p = \frac{Y}{-Z*tan(\theta_{fov}/2)}$</span></p>

<p>For more details check the complete answer <a href="https://computergraphics.stackexchange.com/questions/6365/inverse-value-in-a-perspective-matrix/6366#6366">here</a></p>

CC BY-SA 4.0
2018-12-20T12:59:08.370Z
2018-12-20T12:59:08.370Z
gallickgunner
<p>Assume the screen is axis aligned with origin at 0 and there is absolutely no view transformation.</p>

<p>in other words we will simply try to project the model onto the screen  plane following perspective. Say our FOV is 60 degrees, so the focal length is tan(30).</p>

<p>I am given a vertex <span class="math-container">$V=(x,y,z)$</span></p>

<p>is the projected vertex <span class="math-container">$V_p = V/(z*tan(30))$</span> or <span class="math-container">$V_p = V/(z/tan(30))$</span></p>

CC BY-SA 4.0
2018-10-18T17:00:27.077Z
How is this more directly than any other method?
joojaa
CC BY-SA 4.0
2018-10-18T17:23:04.903Z
Think about it like this.  If you increase 30 to 40, do you want your x,y numbers to get bigger or smaller?  I think smaller.  (wider field of view makes an objects appear smaller)  So you want a bigger number in the denominator. so you want the first one.  (z * tan(30))
Wyck
CC BY-SA 4.0
2018-10-24T17:09:46.803Z
I expect a simplified answer to this. I understand the question but not well enough to know what transform to apply to the vertex.
MisterGeeky
<rendering><geometry><projections><perspective>
Computing perspective directly
Makogan
# Computing perspective directly

(Asked by: username_0 on 2018-10-17)

Assume the screen is axis aligned with origin at 0 and there is absolutely no view transformation.

in other words we will simply try to project the model onto the screen plane following perspective. Say our FOV is 60 degrees, so the focal length is tan(30).

I am given a vertex $V=(x,y,z)$

is the projected vertex $V\_p = V/(z\*tan(30))$ or $V\_p = V/(z/tan(30))$

**Tags:** rendering, geometry, projections, perspective

> **Comments:**
> **username_1**: How is this more directly than any other method?  
> **username_2**: Think about it like this.  If you increase 30 to 40, do you want your x,y numbers to get bigger or smaller?  I think smaller.  (wider field of view makes an objects appear smaller)  So you want a bigger number in the denominator. so you want the first one.  (z * tan(30))  
> **username_3**: I expect a simplified answer to this. I understand the question but not well enough to know what transform to apply to the vertex.  

---

## 1 answers

### Answer by username_4 on 2018-12-20. Score: 3 | Accepted answer

Copying this from another thread where i posted this as the answer but as username_2 suggested, the correct answer is the first one.

There is the whole derivation of it but I'll be discussing a brief overview.
This is for the perspective projection where the line joining the eye and the center of the projection/image plane is perpendicular to it. Like here

[![enter image description here](https://i.sstatic.net/WmmPi.png)](https://i.sstatic.net/WmmPi.png)

As we can easily see, by similar triangles $\triangle ABC$ and $\triangle AEF$ we have

$Y\_p / Y = D/-Z$

where $Y\_p$ is the projected $Y$ coordinate on to the image plane. $AB = D$ is the total distance from eye to the image plane and is usually set to 1.

Hence we have,

$Y\_p = (Y\*D)/-Z$

We can easily ee from here that,

$tan(\theta\_{fov}/2) = 1/AB$

$tan(\theta\_{fov}/2) = 1/D$

$D = 1 /tan(\theta\_{fov}/2)$

Hence we have,
$Y\_p = \frac{Y}{-Z\*tan(\theta\_{fov}/2)}$

For more details check the complete answer [here](https://computergraphics.stackexchange.com/questions/6365/inverse-value-in-a-perspective-matrix/6366#6366)


---

