Added the calculation of a perspective matrix.