The *z* value in eye coordinates, *z*_{eye}, can be computed from the window
coordinate *z* value,
*z*_{window}, using the near and far plane values, *near* and *far*,
from the `glFrustum()` command and the viewport near and far values,
*far*_{vp} and *near*_{vp}, from the `glDepthRange()` command using
the equation:

The *z* window coordinate is computed from the eye coordinate *z* using
the equation: