perspective matrix (taken directly from http://greggman.github.io/webgl-fundamentals/webgl/lessons/webgl-3d-perspective.html)