## OpenGL Model-View Transformations

‹ OpenGL Graphic Primitives | ● | OpenGL Coordinate Systems ›

Each of the above model and view transformations can be represented as multiplication of the vertices $\vec{v}$ with a 4×4 Matrix $M$ in homogeneous coordinates:

The modeling transformation corresponds to a 4×4 matrix $M_M$ (which is an affine transformation).

The view transformation corresponds to a 4×4 matrix $M_V$ (which is the inverse of the camera modeling transformation).

Then the consecutive application of the above transformations yields the combined **model-view matrix** $M_{MV}$ with:

As final step the perspective transformation projects the vertices onto the image plane. This corresponds to a division by the z-component in camera coordinates.

The perspective transformation corresponds to a 4×4 matrix $M_P$ (which is a non-linear matrix). Together with the model-view transformations this yields the combined **model-view-projection matrix** $M_{MVP}$ with:

So the graphics pipeline effectively performs the following computation for each incoming vertex:

This takes about 30 flops per vertex.

‹ OpenGL Graphic Primitives | ● | OpenGL Coordinate Systems ›