Objects in a WebGL scene go through different transformations before we see them on our screen. Each transformation is encoded by a 4x4 matrix. How do we multiply vertices that have three components, (x, y, z), by a 4x4 matrix? The short answer is that we need to augment the cardinality of our tuples by one dimension. Each vertex will then have a fourth component called the Homogeneous coordinate. Let's see what they are and why they are useful.
Vertex Transformations
Homogeneous Coordinates
Homogeneous coordinates are a key component of any computer-graphics program. These coordinates make it possible to represent affine transformations (such as rotation, scaling, shear, and translation) and projective transformations...