Homogeneous Vectors

3D graphics uses a 4D generalization of the 3D vector. \[\V{v}=\begin{bmatrix} v_x \\ v_y \\ v_z \\ v_w \\ \end{bmatrix}=\begin{bmatrix} v_x / v_w \\ v_y / v_w\\ v_z / v_w\\ 1 \\ \end{bmatrix}\]

It allows translation, perspective, points at infinity, etc., to be handled using only matrix multiplication.

The GL allows the $w$ component to be omitted. By default, $w=1$.

* Vectors are named with bold lower-case. Vector elements use italic subscripted lower-case.