# Computing perspective directly

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))$$

• How is this more directly than any other method? Oct 18, 2018 at 17:00
• 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
Oct 18, 2018 at 17:23
• I expect a simplified answer to this. I understand the question but not well enough to know what transform to apply to the vertex. Oct 24, 2018 at 17:09

Copying this from another thread where i posted this as the answer but as Wyck 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

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