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